Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Timeline: dataserialization bug #2015

Closed
mokraemer opened this issue Aug 11, 2016 · 4 comments
Closed

Timeline: dataserialization bug #2015

mokraemer opened this issue Aug 11, 2016 · 4 comments

Comments

@mokraemer
Copy link
Contributor

mokraemer commented Aug 11, 2016

The timeline seems to have an issue where the timezone is not utc. See
[http://visjs.org/examples/timeline/dataHandling/dataSerialization.html]
If you save the current values to the textarea and load the data back, each entry is moved (here 2 hours in time).

My solution is to change it to utc, but the option "showCurrentTime" does honor the option "moment: function(date) {
return vis.moment(date).utc();
}"

@mojoaxel
Copy link
Member

I can confirm this. We should have a look and fix this.

@mojoaxel mojoaxel added this to the v4.17 milestone Oct 17, 2016
@yotamberk
Copy link
Contributor

yotamberk commented Oct 28, 2016

@mojoaxel I don't see an easy way to solve this... The only workaround I see that works is applyingvis.moment(data.start) and vis.moment(data.end) over all the data every time you load the data...
I really don't see a legit way to do it except for saving any date object in the dataset as a moment date, which requires some breaking changes...

@mokraemer
Copy link
Contributor Author

but don't you agree it is a need for the entire applet that loading a stored dataset gives you the same data as before? It is not quite common all computers use utc time ;-)

The question on breaking changes is - what does it break and who is affected.

@mojoaxel
Copy link
Member

I can not longer reproduce this issue with the current develop version.
I have provided some improvements for this issue with #2244 but I think we can mark it as fixed 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants