slco-2016 / clientcomm

A communications platform for case managers in the Criminal Justice System.
https://clientcomm.org/
Other
10 stars 3 forks source link

Daylight savings time causing times to be off on set notifications by 1 hour. #317

Open kuanb opened 7 years ago

kuanb commented 7 years ago

To resolve this, look at the moment.js documentation under zone name (moment.fn.zoneName) to parse time zone. It might also be a good strategy to do something client side to determine what time zone the browser is in and fallback to the organization time zone in the cases where no time zone is returned.

Reference for moment.js docs: http://momentjs.com/timezone/docs/

tdooner commented 7 years ago

OHHHH I don't think this is a bug -- it's just that SLCO is an hour ahead of us!

Most times that are displayed in the product seem to be run through moment.tz so I think this is probably good.

tmaybe commented 7 years ago

Is the app's time zone set to the Mountain Time Zone somewhere in the application or config?

tdooner commented 7 years ago

Yeah, in the application. Each organization has a time zone. For SLCO it is set to America/Denver which is the way to do it correctly to allow moment.js to compensate for DST. Also it appears that most timestamps are full datetimes instead of just times, which is another common pitfall I have, uh, personally experienced, when compensating for DST.

tmaybe commented 7 years ago

Reading the text of this issue more closely, it seems that it might be referring to a mismatch happening when a notification is created (presumably through the application GUI). Like, you set a notification for 4pm and it's actually scheduled an hour off. Not sure if it refers to notifications created when the browser's in a time zone other than Mountain, or ...?