News for hackers. Stuff that matters.
Re:RFC 3339 vs. ISO 8601 by jvanderbot on Thursday August 31, 2023 @02:00PM (#37341249)
And so, you want a probabilistic time estimate based on the likelihood of that passing?
Re:RFC 3339 vs. ISO 8601 by codetrotter on Thursday August 31, 2023 @02:04PM (#37341311)
Store the gps coordinates of the location for the meeting instead, along with the desired local time and local date.
Re:RFC 3339 vs. ISO 8601 by jvanderbot on Thursday August 31, 2023 @02:09PM (#37341399)
But the local time would change according to GP's comment.
Re:RFC 3339 vs. ISO 8601 by wrs on Thursday August 31, 2023 @02:14PM (#37341467)
The point is that the local time would not change, even though the offset between UTC and local did change.
Re:RFC 3339 vs. ISO 8601 by jvanderbot on Thursday August 31, 2023 @02:30PM (#37341719)
I see.

The problem is there is no difference between local time and "offset from UTC", right?

Re:RFC 3339 vs. ISO 8601 by codetrotter on Thursday August 31, 2023 @02:59PM (#37342106)
> there is no difference between local time and "offset from UTC"

The difference is between applying the UTC offset for a future event using present rules. What we are saying is you should not do that because the rules can change.

I ask you today that we meet at 3PM on January 24th in 2026, at the train station in Berlin.

In my paper calendar book for I mark the date January 24th 2026 with the following note: “meet jvanderbot at 3PM at the train station in Berlin”.

I carry this book with me for the next few years.

Meanwhile, you decide to be modern so you store a note about the meeting in a database. In doing so, you convert the information into a UTC offset for that future time. But you are using current rules for today, which may change.

And then when the day arrives, there has been political changes in the meantime that made it so that the utc offset is different.

Because you converted to utc offset ahead of time, your representation of the time no longer maps to “3 PM” but instead to let’s say “4 PM”.

I show up at 3 PM local time, as we had agreed. But you are nowhere to be seen because in your digital calendar the meeting appears to be for “4 PM”.

This is what we mean when we are talking about the problem with converting a local time to a UTC offset a long time ahead.

Re:RFC 3339 vs. ISO 8601 by kelnos on Thursday August 31, 2023 @04:07PM (#37343000)
Local time has no notion of a UTC offset. Local time is just "9am on August 31, 2024". It's up to the application's implementation details to pair it with a physical location (e.g. some lat/long in London). The app would then have to (as the event date approaches) resolve that into something more computer-clock-understandable; that is, it would have to say "this lat/long is located in timezone XYZ, which has offset ### for that date", so it could tell the OS's notification service to pop up reminders at the appropriate times.
Re:RFC 3339 vs. ISO 8601 by scbrg on Thursday August 31, 2023 @04:35PM (#37343356)
As long as the invited people don't change nationality...

https://www.972mag.com/the-worlds-only-ethnic-time-zone/

If there's one thing I've learned about time keeping, it's that whenever you think you've got it all figured out, there's always one more corner case.

Re:RFC 3339 vs. ISO 8601 by codetrotter on Thursday August 31, 2023 @02:13PM (#37341457)
The top level comment said

> specify a meeting in London, on July 1st 2030, at 6pm local time - no matter what happens to UK timezones between now and then

GPS coordinates + local date and local time will preserve “a meeting in London, on July 1st 2030, at 6pm local time” in the desired way

Re:RFC 3339 vs. ISO 8601 by jvanderbot on Thursday August 31, 2023 @02:33PM (#37341771)
How: 6PM local time could mean Zulu+6 or Zulu+3 or anything else if local timezone offset changes via legislation. The best way to do it would be to say "X seconds from the time this message was sent"
Re:RFC 3339 vs. ISO 8601 by avianlyric on Thursday August 31, 2023 @02:47PM (#37341961)
> 6PM local time could mean Zulu+6 or Zulu+3 or anything else if local timezone offset changes via legislation.

That’s the point. Normal people think about time based on their local time. If they agree to meet someone at 3pm on a day in the future, that normally means turning up on that day when a local clock on that day reads 3pm. If local time changes offset from UTC, then the meeting implicitly also changes.

I’ve personally yet to meet someone that reschedules all their appointments every time day light saving (or the inverse) rolls around. Just make sure their appointment times in UTC don’t change.

Re:RFC 3339 vs. ISO 8601 by noselasd on Thursday August 31, 2023 @03:35PM (#37342563)
"X seconds from the time this message was sent" would certainly not hit 6PM local time if the local timezone offset changed - unless you also update X every time it does.
Re:RFC 3339 vs. ISO 8601 by kelnos on Thursday August 31, 2023 @04:12PM (#37343066)
+6 or +3 is irrelevant to the scheduler when they're setting the meeting time: they want it to be 6pm regardless of any time zone changes in the future. So they deliberately do not store the UTC offset with that time. They only store the geographic location.

Then when the meeting time is approaching, the software can figure out what time zone (and UTC offset) applies, after taking account any time zone changes that have taken place in the intervening years, and appropriately set reminder notifications.

If they were to store "X seconds from the time this message was sent", then any time zone change would likely make it not fall at 6pm on the target day, so that's not what they'd want.

Re:RFC 3339 vs. ISO 8601 by stouset on Thursday August 31, 2023 @02:15PM (#37341488)
That seems to be in line with what GP wants.
Re:RFC 3339 vs. ISO 8601 by jvanderbot on Thursday August 31, 2023 @02:53PM (#37342039)
I see. I misunderstood!
Re:RFC 3339 vs. ISO 8601 by isbvhodnvemrwvn on Thursday August 31, 2023 @05:58PM (#37344200)
This limits your meetings to surface of earth, what if I want to meet with you on Mars?
Re:RFC 3339 vs. ISO 8601 by dotancohen on Friday September 01, 2023 @05:15AM (#37348483)
Even on the surface of the Earth there could be ambiguity. Some places have moved up to four meters in GPS coordinates after an earthquake. In Amsterdam that could be the difference between a war memorial and a brothel.
Re:RFC 3339 vs. ISO 8601 by toast0 on Thursday August 31, 2023 @02:49PM (#37341988)
I think it's reasonable to estimate the future time based on the current published rules. You don't need to guess at the probability of future published rules, but you do want to have sufficient information to reevaluate the published rules.

This is why storing UTC dates for future events is insufficient: if the event is actually specified in local time, the date is incorrect when the time zone rules are changed. But storing the time zone is insufficient if the time zone that applies to the event also changes; you also need to store enough information to reevaluate which time zone is applicable.

Of course, it can be difficult to gather this information in a user friendly way, so you know, compromises.