This repository has been archived by the owner on Jul 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Timeline displayed in UTC #1096
Comments
I've just made a PR that would address that issue: #1098. This allows yout to pass a custom function as the format option. Displaying UTC was exactly my use case (as well as a 'x days ago' label on another timeline instance). |
Thanks! But I think that would not get it quite right. It's not enough to modify the labels. The lines separating days would need to move accordingly. The easiest way for it all to fall in place would probably be to fetch "now" as UTC rather than localtime. |
Duplicate of #24. Support for time zones will be available in the first next release (see #24 (comment)). |
Upgraded to 4.7.0 and the new option moment looks like it's working great. Thumbs up to Almende! |
Thanks :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If I add items with ISO UTC start and end (i.e. a T between date and time) they get picked up correctly. However, since my PC is running in European summer time (UTC+2) they are displayed off by 2 hours which is startling.
In order for all users of my timeline to have the same view, it would be great to have an option to display labels and current time in UTC.
I have looked at moment.js, and it looks like everything needed is there, but I'm not sure of all the places where this would be plugged into vis.js. Likely all places where you call
moment(...)
need to be changed to optionally callmoment.utc(...)
. Or else, after that, you optionally callresult.utc()
.The text was updated successfully, but these errors were encountered: