Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS...
by bbojan on Wednesday May 28, 2025 @09:23AM
(#44115775)
You mean you must record the timezone? Because the TZ offset can change throughout the year (e.g. due to daylight saving time).
Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS...
by hughw on Wednesday May 28, 2025 @09:29AM
(#44115837)
Usually the TZ offset is enough. The use case is a guy reading notes and logs from multiple sources. All that guy needs is to see the local time at the time and place of the event. So that, for example, he can match up the time stamp on some computer recorded log with the time some human operator recorded, in local time, on a paper record.
An engineer in the US reviewing industrial measurements logged in a plant in Asia from a variety of sources is definitely going to encounter lots of events recorded in local time. It would be maddening for that engineer to have to review and resolve events from different time coordinates, especially if they are doing the review months or years later. It's best to accept that reality and adopt local time as the standard. Then you must record the TZ offset per UTC in any new system you create.