3 ms·
> If any application only saves the date and not the time and you have dates like 2021-06-28T00:00:00 or something like that. I literally just spent hours goin
by EMM_386 5y ago
> If any application only saves the date and not the time and you have dates like 2021-06-28T00:00:00 or something like that.
I literally just spent hours going around a code base fixing this exact problem.
Our back-end is a legacy, 20+ year old database where it was decided to save dates without a timezone.
console.log(new Date("2011-09-24"));
is:
Fri Sep 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
These dates were all "thought" to be EST, not UTC. Good times.
More fun examples here:
https://stackoverflow.com/a/31732581/154603 https://stackoverflow.com/a/31732581/154603