4 ms·
> 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, w
by cwmma 6y ago
> 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
- dmit 6y agoYou'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.