More succinctly, dates don't have timezones because they don't have times.
You're creating a schedule for a tour. The tour occurs some time in the future. You have a daily itinerary for the tour group.
Now the destination country changes their time zone in some fashion. You don't want to have ever stored an instant, you want the date and time to be more abstract. 9am, as it will be understood at that date and time in the future.
The same also occurs for past events, but we don't tend to encounter that too often, although the calendar for September 1752 in the UK (at the time known as the Kingdom of Great Britain) shows another wrinkle
I don’t remember if it was in 1 or 2 or even more years, but Google calendar absolutely did make the event off-by-one day.
So it's a naive date.
Not sure how to support naive time, though, like 23:59:59, (or even leap-second one, 23:59:60). Probably have to store it as integers, and deal with conversion on application side.
It makes a solid distinction between Dates, times, instants, and zone dates/times.
And Instant is a moment in time. Exposed as a UTC time stamp.
Birthdays etc are best expressed as LocalDates. There’s also LocalDateTime for zone-agnostic features.
If I were writing software like you describe I’d want an explicitly zone-agnostic date(time) to represent it.
I would love to see this as a data type (CalendarDate) baked into languages & databases which would prevent you from applying timezone conversions to it.
https://www.seanmcdonald.xyz/p/the-clockchain-protocol-the-l...
cal.com is solving some of these problems with handling of all zones.
I mean, that's literally the four dimensions of space-time.
I work on software for astronomy, and that quadruplet is what’s used to describe an observing location. You can actually get a little in trouble because of changes in the shape of the earth over time, so latitude and longitude and altitude need to be treated as time-dependent values, which matters once you are accounting for relativistic effects.
Unix timestamps, on the other hand, are not unique.
Lebanon seems to have experienced exactly this recently:
https://www.bbc.com/news/world-middle-east-65079574
It does unambiguously give you a spacetime coordinate (useful) but it doesn't unambiguously tell you what local time you should use for an occurrence, and the answer would really depend on who was asking.
It’s not.
If I set up a meeting next year in NYC at 10 and the legislature decides to change the timezone’s offset, the meeting remains at 10 NY time on that date, it does not shift in NY time. It’s the UTC which shifts.
And UTC alone is sufficient for past events, as they are fixed instants in the time-stream. Unless you’re at a stage where you need to take relativistic effects in account, then you need to add the referential.
An example of non-UTC time is TAI, which is International Atomic Time. The difference is that UTC has leap seconds to deal with changes in the rate of rotation of the earth, while TAI marches on without any discontinuities.
So for a date to be “in UTC” really just means it uses the leap seconds published by IERS. This article says “integers in UTC” which is a little ambiguous, but probably means “integer UTC seconds since the Unix Epoch.”
Birth dates, contract dates, sale dates, billing dates, insurance coverage dates, etc.
---
EDIT: UTC still plays a role -- as there is still the choice of calendar (though you'd be forgiven for assuming Gregorian) -- but it's an odd statement to decipher.
I think of date more like a date time simplified to day precision.
Still, I agree UTC date is unclear.
But you can store, operate, and query on dates without the foggiest clue about instants or timezones.
Nobody is going to adjust your birthdate when you move abroad.
If you move east, you’ll be able to drink a little earlier than if you move west.
Nobody is adjusting Christmas Eve against the time zone of Bethlehem.
There are many situations where a date is just a number in a calendar and not a specific time on planet earth.
But that’s just a convention, right? The day you are born is still dependent on the time zone. If you are born in the US at 11pm EST then someone born at that same moment in the UK has a different birthday.
Dates have boundaries. These boundaries are dependent on time zone. We can talk about dates irrespective of time zone but day periods cannot be understood without reference to time zone.
Yes, "just."
Dates are "just" a convention.
UTC is very much a timezone, that’s why it has a timezone designator (Z).
If you record a future PST date as UTC and PST changes, your recorded date is now wrong.
> So for a date to be “in UTC” really just means it uses the leap seconds published by IERS. This article says “integers in UTC” which is a little ambiguous, but probably means “integer UTC seconds since the Unix Epoch.”
And that’s guaranteed to fuck up for future local events.
Damn. That's a very good point. From now on, I'll be always recording also timezone, especially when it comes to future dates!
This is just not correct. The "Z" is a historical maritime designation for the zero-point timezone, GMT, and predates UTC by decades.
UTC is defined by the International Telecommunications Union in recommendation TF.460-6 (pdf link: https://www.itu.int/dms_pubrec/itu-r/rec/tf/R-REC-TF.460-6-2...). It's brief and you won't find any mention of time zones.
The symbolism "UTC+0" or the "Z" timezone come from ISO-8601, which is a specification for how to represent times in strings. You can find that specification here: https://web.archive.org/web/20171019211402/https://www.loc.g...
See section 2.1.12 Note 3:
> UTC is not a time zone, it is a standard. UTC is also not GMT (Greenwich Mean Time), rather, UTC has replaced GMT. UTC is more precise; the term 'GMT' is ambiguous.
That document goes to great lengths to keep this distinction between time scales and time formats. They're different, and conflating them will get you very confused. When you describe a time in PST, you are almost certainly using UTC.
The Parquet datatypes documentation is pretty clear that there is a flag isAdjustedToUTC to define if the timestamp should be interpreted as having Instant semantics or Local semantics.
https://github.com/apache/parquet-format/blob/master/Logical...
Still no option to include a TZ offset in the data (so the same datum can be interpreted with both Local and Instant semantics) but not bad really.
It sucks.
What does it mean for a date to be utc? my date, but in the utc timezone? Usually when I write a date to a file, I want a naive date; since that’s the domain of the data. 2020-12-12 sales: $500. But splitting that by some other timezone seems to be introducing a mistake.
Often I want to think in local naive time too, especially for things like appointments that might change depending on dst or whatever. Converting to utc involves some scary things. Timestamps are also useful but I don’t want to transcode my data sometimes as the natural format is the most correct.