Comments (5)
Hi Bryant, this does look like timezone issue.
The as_of
column is timezone aware:
local_tz = mktz()
if not as_of:
as_of = dt.now()
if as_of.tzinfo is None:
as_of = as_of.replace(tzinfo=local_tz)
If mktz()
and dt.now()
is reporting inconsistent data (say, dt.now()
gives Boston time and mktz()
gives London timezone) this would explain the broken test. Would you mind confirming those two functions' output on your machine?
from arctic.
from arctic.date import mktz
mktz()
tzfile('/usr/share/zoneinfo/America/New_York')
import datetime
datetime.datetime.now()
datetime.datetime(2015, 12, 19, 8, 19, 45, 540301)
datetime.datetime.now().tzinfo is None
True
the unit tests clearly expect that the timezone is london/GMT. It looks like the code you shared above will force everything to the local tz since datetime.now seems to give something without a timezone
from arctic.
Right so we have two problems here.
- The RHS of the assert statement should have local tz info
- (!) Multi-datetime-index df loses timezone info after write->read
Will look into a fix
from arctic.
Is there a reason we don't just store everything at UTC and apply a timezone later?
from arctic.
It does! It's just the codepath not supporting multi-index fully (yet)
from arctic.
Related Issues (20)
- Impossible to asignate datetime index
- Migrating existing tickstore to ArcticDB HOT 3
- Update tests to use MongoDB 4.4
- delete_library does not delete the data file in the folder
- AttributeError: 'Timestamp' object has no attribute 'astype'
- TickStore in ArcticDB
- Dask integration for tickstore
- arctic.exceptions.QuotaExceededException: Mongo Quota Exceeded: xxx 10.366 / 10 GB used HOT 1
- Index Monotonic Sort Bug in class DateChunker
- best practice usage HOT 1
- Missing last chunk in CHUNK_STORE HOT 1
- argument of type 'NoneType' is not iterable (when updating) HOT 1
- When to upgrade to python3.10? HOT 1
- circleci build container new Unix version breaks mongo install HOT 1
- Test arctic with mongodb 4.4 HOT 1
- VersionStore delete old snapshots very slow with large numbers of snapshots HOT 1
- Versionstore: Arctic automatically assigns index a name - Perhaps needs some warning HOT 1
- Java interface (JDBC) support HOT 1
- using the numpy no more than 1.18.5. This will cause issue when work with other libraries, for example matplotlib. HOT 1
- "AttributeError: 'NoneType' object has no attribute 'append'" using 4 or more threads. Fewer threads works fine. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arctic.