Showing the Timeline as UTC instead of local timezone

494 views
Skip to first unread message

Swoop

unread,
Sep 14, 2012, 5:50:10 PM9/14/12
to chap-link...@googlegroups.com
Hello,

I noticed that my installed instance of timeline (2.3.0) is running according to my local time zone (MST).  I would like to change it to show UTC time instead of MST.

After looking at the documentation, it appears the only way to accomplish this is to use setCurrentTime(utcTime) method.

While this does adjust the red time indicator to the correct UTC time, all of the items on my timeline still show relative to MST.  I did verify that the timestamps for each item were valid UTC times.

How can I get the timeline to display as UTC instead of my local time zone, without having to add 7 hours to each timestamp?

And I wanted to thank you for your responses to my previous threads.

Jos de Jong

unread,
Sep 17, 2012, 3:23:45 AM9/17/12
to chap-link...@googlegroups.com
The Timeline just displays the dates with the local time zone, using default javascript methods like date.toString(), date.getHours(), etc. The Javascript Date object has no methods to change the timezone, so maybe the easiest way to display the dates in UTC is to create the dates of your items without timezone information. This question may help: http://stackoverflow.com/questions/439630/how-do-you-create-a-javascript-date-object-with-a-set-timezone-without-using-a-s



--
You received this message because you are subscribed to the Google Groups "CHAP Links Library" group.
To view this discussion on the web visit https://groups.google.com/d/msg/chap-links-library/-/I6KOJIWtWa0J.
To post to this group, send email to chap-link...@googlegroups.com.
To unsubscribe from this group, send email to chap-links-libr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/chap-links-library?hl=en.

Swoop

unread,
Sep 20, 2012, 12:00:23 PM9/20/12
to chap-link...@googlegroups.com
Thank you, I will give setUTCHours() a try and see if it provides the desired results.
Reply all
Reply to author
Forward
0 new messages