News for hackers. Stuff that matters.
Re:We now consider Moment.js to be a legacy project in maint... by cwmma on Tuesday September 15, 2020 @01:14PM (#24483777)
> 1b) `DateTime` should probably be split into two separate things, one of which is aware of time zones.

due to daylight saving timezones depend on the date, which makes it hard to separate date and time

Re:We now consider Moment.js to be a legacy project in maint... by dmit on Wednesday September 16, 2020 @06:35PM (#24498807)
You're right! I should have phrased that better. I didn't mean splitting `DateTime` into timezone-aware `Date` and `Time`. I meant two different `DateTime`s.

Sometimes you need "Wake me up on December 24th at 10:00, regardless of where I am that day", and sometimes you want "The match will start on May 1st at 21:00 British Standard Time, and I want to be alerted about this even if I'm in New Zealand at that moment."

What I meant is a distinction between a `LocalDateTime` (first example, timezone is not relevant) and a `ZonedDateTime` (second example). The latter is very close to `Instant`, which is a point on the UTC timescale, but the subtle difference is that if timezone definitions were to change - as they often do - the `ZonedDateTime` would correctly remap to the actual `Instant` when the event was happening.