From 4b75746391006fcecc709b62fe02e806e834af3b Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Sat, 14 Oct 2017 20:06:52 -0400 Subject: [PATCH] Display event_timer in UTC format By default date.parse() will use the local timezone from the browers. But, we want to force UTC, since users are from around the world. Change-Id: I6430704f46c293e31804e6890eac1abcb955ad8a Signed-off-by: Paul Belanger --- doc/source/_static/event_timer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/_static/event_timer.js b/doc/source/_static/event_timer.js index 06d4e241..ecf0b7f8 100644 --- a/doc/source/_static/event_timer.js +++ b/doc/source/_static/event_timer.js @@ -24,8 +24,8 @@ function setup_timeline() { var now = parseInt((new Date).getTime() / 1000); for (i = 0; i < events_timeline.length; i++) { var current_event = events_timeline[i]; - var current_event_start = Date.parse(current_event.start) / 1000; - var current_event_end = Date.parse(current_event.end) / 1000; + var current_event_start = Date.parse(current_event.start + "Z") / 1000; + var current_event_end = Date.parse(current_event.end + "Z") / 1000; if (now > current_event_end) { set_event_status(current_event.name, 'Past'); }