pnsn / mustangular

Version 2 of MUSTANGular.
1 stars 0 forks source link

MUSTANGular using PDT time zone instead of GMT/UTC #2

Closed gillian-earthscope closed 5 years ago

gillian-earthscope commented 6 years ago

The selected start and end date in the MUSTANGular query gets sent to MUSTANG as the local PDT time zone instead of GMT/UTC. This results in returned value that do not match the intended dates.

For example, selecting a start date of 08/12/2018 and an end date of 08/14/2018 produces this MUSTANG query:

http://service.iris.edu/mustang/measurements/1/query?nodata=200&net=IU&start=2018-08-12T07:00:00.000&end=2018-08-14T07:00:00.000&metric=PERCENT_AVAILABILITY&output=text

This query will not return values for 08/12/2018 (for metrics that have start times of 00:00:00).

kyla-m commented 6 years ago

Thanks for pointing that out. I've fixed it and will update it on assets shortly.

gillian-earthscope commented 6 years ago

The fix does not work correctly. For example, I select start and end dates of 08/01/2018 - 08/16/2018 and it makes a MUSTANG request for 07/31/2018 - 08/15/2018. Then when I navigate back to the query page, it shows start and end dates of 07/30/2018 - 08/14/2018.

kyla-m commented 6 years ago

What internet browser are you using? I can't reproduce that behavior since the fix.

gillian-earthscope commented 6 years ago

I’m using Safari.

-Gillian

On Aug 17, 2018, at 9:57 AM, Kyla Marczewski notifications@github.com wrote:

What internet browser are you using? I can't reproduce that behavior since the fix.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pnsn/mustangular/issues/2#issuecomment-413926869, or mute the thread https://github.com/notifications/unsubscribe-auth/AVuC6sGyZGDaRaX0VBm_Us_ul7wJOinBks5uRvX3gaJpZM4V-1Or.

kyla-m commented 6 years ago

Thanks! I'll check it out.

gillian-earthscope commented 6 years ago

I just tried it on Firefox, and it works ok there. It looks like it’s only a Safari issue.

-Gillian

On Aug 17, 2018, at 9:58 AM, Kyla Marczewski notifications@github.com wrote:

Thanks! I'll check it out.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pnsn/mustangular/issues/2#issuecomment-413927233, or mute the thread https://github.com/notifications/unsubscribe-auth/AVuC6lJnTYNcQS4N0N4vIrDgzwvKreMaks5uRvZNgaJpZM4V-1Or.

kyla-m commented 6 years ago

Yes, it appears to be caused by safari. They don't follow the same standard for dates as the other browsers. It is fixable though.

kyla-m commented 6 years ago

Fixed, works the same on safari, chrome, and firefox.

gillian-earthscope commented 5 years ago

This also affects the plotting in Safari; the data points for metrics that start at 00:00 appear to be offset to midday. Firefox plots dates accurately.

Safari example: safari

Firefox, same plot: firefox

kyla-m commented 5 years ago

Fixed by ensuring UTC use in safari.