-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
POSIXct joins give weird results #819
Comments
Here's a simpler example: date1 <- structure(-1735660800, tzone = "America/Chicago", class = c("POSIXct", "POSIXt"))
date2 <- structure(-1735660800, tzone = "UTC", class = c("POSIXct", "POSIXt"))
df <- data_frame(cst = date1, utc = date2)
left_join(df, df) |
I get:
So the times are correct and we lose the time zone information. |
Ideally we should preserve them, using a similar strategy to factors:
We can work on this in 0.4 we tackle this for all vector types and all combination methods (rbind, joins, combine etc) |
Ah. I had a fix that was just copying attributes from the left one, e.g. :
I'll push this now, but we can think about it again with 0.4. |
left argument for `POSIXct` and `Date` objects (#819).
Looks good now. |
I'm not sure if this touches dplyr, or lubridate, or both.
Time zones were in their infancy those years, but they are well defined. Lubridate and base methods have different defaults, and this is fine.
In a data frame the time zone is not obvious. But when we try to join...
The first column goes awry silently. If a data frame is joined with itself, it should be indifferent to the timezone used.
The text was updated successfully, but these errors were encountered: