globalmangrovewatch / gmw-users

All functionality for user accounts in the Global Mangrove Watch platform
MIT License
2 stars 2 forks source link

Feature/298 make dates display utc #332

Closed mmnoo closed 1 year ago

mmnoo commented 1 year ago

Background: MUI detects a UTC time stamp (or time stamp with no time) and tries to show it in browser local time. So if you look at the same date from Japan or California, it will render as different days. See original ticket for more examples: https://github.com/globalmangrovewatch/gmw-users/issues/298

Big thanks to @ghelobytes for unblocking this!!!! 🎉

There is no way to tell MUI date pickers not to do that and to show the date/time in the original form.

Description of hack to make MUI date picker display UTC:

~~Question for devs:

If we proceed, I would update the rest of the dates in the app to behave similarly.

github-actions[bot] commented 1 year ago

A review app was created for this PR. See https://gmw-users-staging-73479e7.herokuapp.com/

github-actions[bot] commented 1 year ago

A review app was created for this PR. See https://gmw-users-staging-e7969d7.herokuapp.com/

github-actions[bot] commented 1 year ago

A review app was created for this PR. See https://gmw-users-staging-f44a9d8.herokuapp.com/

github-actions[bot] commented 1 year ago

A review app was created for this PR. See https://gmw-users-staging-7c6e122.herokuapp.com/

julia-rom commented 1 year ago

what's a good way to test this @mmnoo does this change mean that we now have timezone id's?

mmnoo commented 1 year ago

what's a good way to test this @mmnoo does this change mean that we now have timezone id's?

Sorry bout that. The best way I have figured out is to use the sensors panel in dev tools. Switch the locations. Both for reading the dates and editing them. I also look up what was submitted in postman.

Screen Shot 2022-10-12 at 2 06 49 PM
github-actions[bot] commented 1 year ago

A review app was created for this PR. See https://gmw-users-staging-05a661c.herokuapp.com/

github-actions[bot] commented 1 year ago

A review app was created for this PR. See https://gmw-users-staging-9ab0103.herokuapp.com/

github-actions[bot] commented 1 year ago

The review app https://gmw-users-staging-73479e7.herokuapp.com/ was deleted.

github-actions[bot] commented 1 year ago

The review app https://gmw-users-staging-e7969d7.herokuapp.com/ was deleted.

github-actions[bot] commented 1 year ago

The review app https://gmw-users-staging-f44a9d8.herokuapp.com/ was deleted.

github-actions[bot] commented 1 year ago

The review app https://gmw-users-staging-7c6e122.herokuapp.com/ was deleted.

github-actions[bot] commented 1 year ago

The review app https://gmw-users-staging-05a661c.herokuapp.com/ was deleted.

github-actions[bot] commented 1 year ago

The review app https://gmw-users-staging-9ab0103.herokuapp.com/ was deleted.