-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add option to format dates as UTC #1956
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
To be precise (and yes, we're aware that this is a mess), Plotly ONLY shows dates in UTC (you'll notice every day on a plotly plot has 24 hours, for example), but if you feed in native js Date objects or milliseconds to mean dates (rather than date strings) we assume what you really wanted was the (UTC) date with the same representation as the date you provided has in the local timezone. See #1532 for more info - one of these days we will need to build in real time zone support, but that's a substantial project (largely due to DST issues) |
How to simply show the current (real-) time of two (or more) different timezones simultaneously?About half a year ago I wrote the code "Timezone Table" below to show a table of all 24 hours of a day correctly aligned for several selected timezones in a Jupyter Notebook. My reason for mentioning that is to point out that
But even if "the example with two Outputs" worked I believe the two Outputs would display the same time twice. Could anyone run it sucessfully? Timezone Table
|
Currently, Plotly offers the
tickformat
property to specify date formats. But the results are always shown in local time. I see no way to format the dates as UTC other than manually transforming all of the dates to offset based on the current time zone so they look like the equivalent UTC time. And obviously, this is a major pain.D3 can certainly handle UTC dates, so Plotly really needs to expose something to allow dates to be shown as UTC.
The text was updated successfully, but these errors were encountered: