Closed bashtage closed 6 years ago
1.56
TickStore
Windows/Mongo 3.4
import datetime import pytz import arctic from arctic.date import DateRange data = [{'index': datetime.datetime(2004, 1, 14, 8, 30, 4, 807000, tzinfo=pytz.utc), 'price': 9142.12, 'qualifiers': ''}] client = arctic.Arctic('localhost') if 'BUG-TEST' in client.list_libraries(): client.delete_library('BUG-TEST') client.initialize_library('BUG-TEST',arctic.TICK_STORE) lib = client['BUG-TEST'] lib.write('blah', data) data_range = DateRange(datetime.datetime(2004, 1, 14, tzinfo=pytz.utc), datetime.datetime(2004, 1, 15, tzinfo=pytz.utc)) reread = lib.read('blah', data_range) print(reread)
Running this returns
2004-01-14 08:30:04.806000+00:00 9142.12
Note the millisecond is 806000, not 807000 as was inserted.
This seems related: https://github.com/manahl/arctic/issues/226
fixed
Arctic Version
Arctic Store
Platform and version
Windows/Mongo 3.4
Description of problem and/or code sample that reproduces the issue
Running this returns
Note the millisecond is 806000, not 807000 as was inserted.