News for hackers. Stuff that matters.
Re:Rob Pike's Rules of Programming (1989) by wtetzner on Wednesday August 12, 2020 @05:56PM (#24137489)
But a shop opening time is not a timestamp, so I think the original advice is still good. A timestamp is the time at which some event happened, which is different than a date/time used for specifying a schedule.

For example, if you wanted to track the history of when the shop actually opened, it would make sense to store a UTC timestamp.

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.

Re:Rob Pike's Rules of Programming (1989) by Joker_vD on Thursday August 13, 2020 @06:05AM (#24141680)
And the time offset that was in effect when the event happened, allows you to easily answer questions like "Did the shop open late, i.e. after 10 AM local time?".