-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Setting date labels loses tz #1718
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
Comments
In your example, there seems to be an issue with the timezone not being properly inherited from the Date object when using
I can still reproduce the issue with the timezone reverting to UTC with the following example:
The issue seems to be related to a call to |
@thomasp85 I think you'll need to take a look at this one. I did a bit of exploration, and the basic problem is that the scale only gets the date time variables once they've been transformed to numeric, so the I think this implies that The scale also needs a way to optionally override the |
My god, date/time scales is a mess... :-) |
Doesn't it make sense to still inherit from It seems that despite the differences there is still a lot of overlaps |
Possibly, but it needs a lot of overriding, and at a certain point it's just easier to not inherit behaviour (or pull out duplicated behaviour into other functions/smaller classes, i.e. composition over inheritance) |
Is it unthinkable that people for some reason would want to transform a timeseries? |
I don't think I've ever seen a custom transformation in the wild, and I think you'd need that currently to (e.g) log transform a time axis. That said, I can imagine a transformation that (e.g.) dropped weekends, but I'm not sure if ggplot2 can handle non-one-to-one transforms. |
Couldn't this be solved using the |
Oh yes, that's quite possible. If you make that change, I'll take a look at this code. |
Fixes #1718 * Store and access timezone when making labels and breaks * Add default timezone argument
The text was updated successfully, but these errors were encountered: