raae/pow-app

Edit entry opens wrong date

Closed this issue · 4 comments

raae commented

A user in the pacific timezone has reported trying to edit notes and then having them saved on the day before.

raae commented

I think this has something to with the entryId to date logic, will try to reproduce.

raae commented

Managed to reproduce by setting the timezone to Calefornia.

raae commented

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date

Support for ISO 8601 formats differs in that date-only strings (e.g. "1970-01-01") are treated as UTC, not local. (highlight mine)

raae commented

Fix by using parseISO from date-fns.