Re:Rob Pike's Rules of Programming (1989)
by TheCoelacanth on Wednesday August 12, 2020 @09:37PM
(#24139136)
> A timestamp is the time at which some event happened, which is different than a date/time used for specifying a schedule.
Correct, but that makes this a rule with much more limited applications than many people are going to interpret it as.
Re:Rob Pike's Rules of Programming (1989)
by account42 on Thursday August 13, 2020 @04:42AM
(#24141206)
Yes, but scheduled times can look like timestamps. It might be tempting to store a date+time+location as just a UTC timestamps but timezones can and do change so the UTC timestamps for that scheduled time is not fixed.
Re:Rob Pike's Rules of Programming (1989)
by dragonwriter on Thursday August 13, 2020 @09:53AM
(#24143327)
> A timestamp is the time at which some event happened,
It's important to the advice to make explicit that the use of “timestamp” in that sense is intended, because “timestamp” is also in many contexts “the data type that combines date and time of day and, perhaps optionally, time zone information”. The application of “timestamps” in the latter sense is not limited to when they represent “timestamps” in the former sense.
For example, if you wanted to track the history of when the shop actually opened, it would make sense to store a UTC timestamp.