-
Notifications
You must be signed in to change notification settings - Fork 979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDateTime could optionally track different time zones for different rows #3160
Comments
Not sure if it make sense to focus on that. Complexity of handling different tz for different rows is quite significant, all operators would need to handle that. I found most reliable and straightforward to just dump all times to UTC at the beginning and apply |
So far I've been doing things Storage will remain UTC-based integer representation throughout, only functions like Functionality I have in in mind handles this logic internally to be less of a fuss. I'll add |
If there are mixed timezones in an input dataset, it's best practice to convert everything to consistent UTC up front. Leaving them mixed in the same column is going to lead to bugs really quickly, slow it down even if it works, and at best result in a new class that can't be passed to other packages. |
I agree that it's a bit niche and hard to maintain. I do think it's quite useful e.g. for building regression models, but I guess the main potential advantage -- skipping over It's worth mentioning that both PostgreSQL and Presto support the I'll close this with a note that it would be useful for a different add-on package to support such a thing. |
simple
base
R time objects (POSIXct
) are ill-suited to handling regional datasets (tzone
attribute is atomic); similarly,POSIXlt
objects are overly broad (every component is a vector).What's really needed is a structure that's just a little bit more general than that offered by
IDateTime
at the moment:Where I'm suppressing the
print
methods for each column to show the simple integer structure of each column.idate
anditime
are as before, but the objects (optionally?NA
by default?) gain atz
column stored as afactor
whose labels name differentOlsonNames()
time zones, e.g.Related methods would then handle printing/formatting/etc appropriately accounting for the
tz
column.Related: #2402, #1451
The text was updated successfully, but these errors were encountered: