News for hackers. Stuff that matters.
Re:Temporal: Getting started with JavaScript's new date time... by EMM_386 on Monday June 28, 2021 @04:00PM (#27667102)
> 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

There are no comments on this comment yet.