icykoneko / ff14-fish-tracker-app

FF14 Fish Tracker App
https://ff14fish.carbuncleplushy.com
MIT License
61 stars 21 forks source link

Time differences are not calculated correctly across DST #72

Closed icykoneko closed 2 years ago

icykoneko commented 3 years ago

All of the datetime information is managed in UTC, but when we display text like, "up in N minutes", the string comes from the date-fns library. Well, apparently, unless you are asking for the seconds, it doesn't quite get times from different sides of DST correct.

See https://jsfiddle.net/0da547Lv/2/

icykoneko commented 3 years ago

Okay, not all dates are stored in UTC. It looks like most of the conversions to earth time are stored in Date objects, so anyone's guess. Probably need to look over all the date code again anyways...

icykoneko commented 3 years ago

This might be fixed by switching to Luxon (#75). When you get a moment... code up a jsfiddle to verify it would work. We should also verify whether upgrading to date-fns v2.x would solve the problem.

icykoneko commented 2 years ago

Can confirm this bug is fixed in date-fns v2.45 (probably sooner). Since #75 was canceled, this issue will be resolved with #76.

icykoneko commented 2 years ago

Fixed via ad88c02959ba3ab936bc3d2a18b615032b5273c7