4 ms·
fnord123, you are confusing Instant with ZonedDateTime (to use java classes as an example). An instant is a moment in time, expressed in java as milliseconds i
by java-man 7y ago
fnord123, you are confusing Instant with ZonedDateTime (to use java classes as an example).
An instant is a moment in time, expressed in java as milliseconds in UTC.
A ZonedDateTime (if we ignore time portion of it for the sake of brevity) is a LocalDate (year-month-day) with a time zone. One can convert an instant to LocalDate given the time zone, or vice versa. But one cannot convert between the two if the time zone is missing.
So, time zone is not a presentation format, it's an essential part of the data. One can, of course, store a LocalDate in a database, iff the timezone is somehow assumed (and hit the land mine when the assumption is violated by a recent change).