Hacker News new | past | comments | ask | show | jobs | submit login

The relationship between absolute points in time and calendar/clock/tz components can be legally changed retroactively.

Just like with any other kind of data, store whatever you are semantically representing. If you are representing an absolute point in time (bread timer), store a Unix timestamp. If you are representing time components, AKA relative time, AKA human time, AKA calendar/clock/tz time, then store those components.

Also, most past clock times we care to store start out as future times.




The relationship between the occurrence of a past event and the second it occurred can not be changed, barring relativity. As such, storing the absolute second offset unambiguously persists the actual time the event occurred regardless of any legal changes.

It will just convert to a different, now agreed upon, civil time according to the calendar chosen. It is no different from citing the current second according to the Gregorian calendar versus the Mayan calendar. They both refer to the same “time”, but use different civil dates. The underlying thing that is convertible to different calendar formats is the real thing and corresponds to the absolute time of the past event.

edit: And no, it is almost guaranteed that most past time events are timestamps of the “current” time which has the same qualities as “past” time. Only future civil times should not use absolute second offset times.


The relationship can't be changed retroactively, or at least not in a practical de facto way. For example "what UTC was at the moment when clocks in Elbonia showed 5PM on December 1st 2024" is a fact that has already happened and won't un-happen just because the Elbonian government passes a law claiming otherwise.

What you do need to worry about is the relationship being after an event has been planned and before the event occurs.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: