by kayodelycaon · 1mo ago · 0 comments
Last time I looked best practice for a real calendar app was to store in local time with time zone, not UTC with offset.
UTC is time in theory. Points in time separated by numbers of seconds. Great until the reality of time being a social construct breaks your assumptions. Still, use UTC until you are actually building a calendar app. Depending on your use case, consider storing timezone instead of offset.
best practice for a real calendar app was to store in local time with time zone, not UTC with offsetThe "time" at which future events are scheduled by humans (i.e. not the time when future events are predicted, like astronomical events), is not a "time", but it is a different data type, which must have a different name and which must store different information (i.e. legal date and time at a certain location).
For future events, the "time" when they will occur is not "time", but a different data type, which should be called "legal time", "local time" or the like.
The "local time" for future events must include the geographic location attached to the event, from which the applicable time zone can be derived, at a time close to when the event is due.