timestamp on midas pages uses GMT timezone

Issue #85 resolved
dd1 created an issue

timestamp on the midas pages should use the timezone of the local browser, not GMT. mhttpd.js uses "new Date.toISOString()" which returns UTC time (London timezone), see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString

This is indicated by the "Z" suffix in the returned string, which is helpfully removed before displaying it on the web page. I strongly believe that the timezone indictor should be present on the web page. At TRIUMF we have to deal with many experiments in many different time zones (DST/PDT for the West Coast, CERN time zone, Ontario time zone (whatever that is), Japan time zone, etc) and confusion on which web page shows which time is not welcome.

I recommend that the output of "new Date().toString()" be used without truncating or otherwise monkeying with it.

K.O.

Comments (2)

  1. Stefan Ritt

    I agree that this should be in local time zone. But Date().toString() is too long for my taste. People don't need to know the day of the week. This takes away precious space in the header line from the message display. So I want it as short as possible, but still general. I don't like the month as a number, because the order is different in Europe and the US, so better have the month as an abbreviation. I also suggest 24h format. I use now Date().toLocaleString with certain options to show

    13 Nov 2017, 16:52:32 GMT+1
    

    Hope this is ok with everybody. If so, please close the issue.

  2. Log in to comment