News for hackers. Stuff that matters.
Re:RFC 3339 vs. ISO 8601 by jbandela1 on Thursday August 31, 2023 @01:45PM (#37341015)
I think you want it more specific than a timezone.

For example, instead of London, suppose you wanted to meet in Glasgow, Scotland, on July 1st 2030, at 6pm local time.

Currently, Glasgow in is timezone Europe/London.

However, it is not unimaginable that in that time, Scotland could hold another referendum on independence and either join Central European Time, or create Scottish Standard Time.

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.

Re:RFC 3339 vs. ISO 8601 by layer8 on Thursday August 31, 2023 @02:52PM (#37342023)
The problem is that we don’t know what the timezone identifiers for hypothetical future timezones will be. Meaning, there would be no automated way to associate those future-date-time values with the correct timezone once the new timezone is added to the tz database.

One could imagine using geo coordinates or similar, but the mapping from those to timezones (or from/to zip codes or area codes) is already not precisely defined.

If you use city names, those might also be split/merged (Berlin) or renamed (Constantinopel).

Re:RFC 3339 vs. ISO 8601 by chaz6 on Thursday August 31, 2023 @03:33PM (#37342533)
If you use coordinates, make sure to take into account continental drift. You could use a plate-local coordinate system (e.g. British National Grid for Great Britain) so you only need to take into account deformation.

There is actually a good read on this at https://www.ordnancesurvey.co.uk/blog/is-britain-on-the-move

Re:RFC 3339 vs. ISO 8601 by crooked-v on Thursday August 31, 2023 @05:28PM (#37343913)
What about storing current geo coordinates and a timestamp of when they were recorded? I feel like that should be enough for a theoretical future system to adjust mapping for continental drift.
Re:RFC 3339 vs. ISO 8601 by joshspankit on Thursday August 31, 2023 @05:41PM (#37344041)
Especially assuming an increase in computing intelligence in that time.
Re:RFC 3339 vs. ISO 8601 by ethbr1 on Thursday August 31, 2023 @10:33PM (#37346113)
The problem with geo coordinates is reverse mapping them back into political owners, so you can then determine current timezone policy.

There's 4 things at play here:

   - Coordinate location on the planet
   - Identifier for that location
   - Political entity for that location
   - Current timezone policy
Of those, coordinates are the only thing that doesn't change over time (for the spans we're talking about).

But are also a pain in the ass to use. F.ex. I'm sure someone on HN has the lat long for London memorized, but I don't.

Re:RFC 3339 vs. ISO 8601 by dmurray on Friday September 01, 2023 @03:29AM (#37347789)
London is perhaps the only major city where you could be expected to know one of these coordinates. It's defined to have longitude 0.
Re:RFC 3339 vs. ISO 8601 by c4mpute on Friday September 01, 2023 @06:52AM (#37349097)
I suggest giving date and time in the form of phase/frequency references to nearby pulsars. That should guarantee stability for a few million years.
Re:RFC 3339 vs. ISO 8601 by euroderf on Friday September 01, 2023 @07:38AM (#37349472)
Europe as a whole is too. IIRC there's a set of points around the periphery of the continent that are measured to centimeter accuracy.
Re:RFC 3339 vs. ISO 8601 by mikequinlan on Thursday August 31, 2023 @03:14PM (#37342312)
>there would be no automated way to associate those future-date-time values with the correct timezone

You could develop a way to specify a location and indicate that you mean 'local time' at that location.

Re:RFC 3339 vs. ISO 8601 by zaxomi on Friday September 01, 2023 @03:00AM (#37347664)
And then they change the calendar. (It has already happened in several regions when changing from Julian to Gregorian calendar. You don't know what calendar will be used at that region in the future)
Re:RFC 3339 vs. ISO 8601 by djbusby on Thursday August 31, 2023 @04:47PM (#37343471)
The zone database recently had a city spelling change on Kiev to Kyiv
Re:RFC 3339 vs. ISO 8601 by ilyt on Thursday August 31, 2023 @05:05PM (#37343671)
change or adding same entry with the name of city changed ?

Coz change like that could fuck some shit up...

Re:RFC 3339 vs. ISO 8601 by LegionMammal978 on Thursday August 31, 2023 @05:44PM (#37344072)
A link was added from "Europe/Kiev" to "Europe/Kyiv" in the included-by-default backward file [0], so that any user that doesn't exclude that file will simply treat the old name as an alias for the new name.

[0] https://github.com/eggert/tz/commit/e13e9c531fc48a04fb8d064a...

Re:RFC 3339 vs. ISO 8601 by 1-more on Thursday August 31, 2023 @05:51PM (#37344129)
There are a few kinds of entry in the tz database. Europe/Kiev is now a Link entry to Europe/Kyiv which is a Canonical entry. Europe/Kiev used to be a canonical entry. What's interesting is there's a lot of thoughtful commentary about changing the name and handling the annexation of Crimea long before Russia invaded Ukraine

For example: https://data.iana.org/time-zones/tzdb-2020d/europe (search for Kiev for the specific part; it's a very long file)

Re:RFC 3339 vs. ISO 8601 by gpvos on Friday September 01, 2023 @07:16AM (#37349295)
I love reading the tz file every now and then, it contains the ultimate time and time zone nerdery.
Re:RFC 3339 vs. ISO 8601 by naniwaduni on Thursday August 31, 2023 @05:38PM (#37344011)
What time zone people use at a given location is not even a function of geographical location; you plausibly also need to know language, culture, political affiliation, and/or employment status.
Re:RFC 3339 vs. ISO 8601 by youainti on Thursday August 31, 2023 @08:43PM (#37345407)
This whole discussion highlights the point that timezones etc. are relatively arbitrary. Often the "time" isn't as important as the events that take place at a given time. E.g. 6pm is a reasonable dinner time on the west coast of the US, but dinner doesn't start for many people in Buenos Aires, Argentina until after 8pm [0].

[0] https://turismo.buenosaires.gob.ar/en/article/what-where-and...

Re:RFC 3339 vs. ISO 8601 by 8n4vidtmkvmk on Thursday August 31, 2023 @09:36PM (#37345770)
How is it not precisely defined? Lat/long to timezone ought to work... timezones have precise boundaries that cover the whole earth, no?
Re:RFC 3339 vs. ISO 8601 by defrost on Thursday August 31, 2023 @09:55PM (#37345882)
A triple (Lat/Lon/UTC Date) <-> TimeZone at the very least.

Time zones are political | * social* especially in the twilight zone between two otherwise well defined zones.

If a country is mostly in TimeZone X then often an extrusion that goes well into TimeZone Y will remain with clocks aligned to TZ-X unless some local political change is made (to be more or less sensible).

See (current TimeZone Map):

https://www.timeanddate.com/time/map/

and note that cities have changed time zones (not daylight savings changes, actual changes to core time zone) in the past and will almostly certainly do so again in the future.

Re:RFC 3339 vs. ISO 8601 by erhaetherth on Friday September 01, 2023 @12:18PM (#37352773)
The changing of zones isn't a problem, that's why we're using lat/lon, but if the nearby countries can't agree on what time it is...that's an issue.
Re:RFC 3339 vs. ISO 8601 by mceachen on Thursday August 31, 2023 @11:34PM (#37346520)
I maintain https://github.com/photostructure/tz-lookup which does this task.

*Every single time* I update the tz source file some arbitrary set of zone names and offsets change. Look at the churn and enjoy the schadenfreude: https://github.com/photostructure/tz-lookup/commits/main/tes...

Re:RFC 3339 vs. ISO 8601 by aidenn0 on Friday September 01, 2023 @01:47AM (#37347270)
> timezones have precise boundaries that cover the whole earth, no?

Not only is that not true, but there are places on the earth where one country may think the timezone is X, but in another country it is illegal to claim that the timezone is X.

This happens most notably with China, which defines the entire country to be in a single timezone, and is engaged in multiple border disputes.

Re:RFC 3339 vs. ISO 8601 by c4mpute on Friday September 01, 2023 @06:54AM (#37349110)
Similarly for many disputed territories in Antarctica, with the added fun of "the south pole region is special". But of course that is a very marginal topic.
Re:RFC 3339 vs. ISO 8601 by Aerbil313 on Saturday September 02, 2023 @07:43PM (#37366426)
What is the issue with taking in a time format which people use at the current time, then convert it to coordinates + unix timestamp for definitive time and using it instead?
Re:RFC 3339 vs. ISO 8601 by ilyt on Thursday August 31, 2023 @05:05PM (#37343659)

    2030-07-01T18:00:00~Scotland/Glasgow ?
Re:RFC 3339 vs. ISO 8601 by lmm on Thursday August 31, 2023 @06:27PM (#37344446)
> However, it is not unimaginable that in that time, Scotland could hold another referendum on independence and either join Central European Time, or create Scottish Standard Time.

Or be in the middle of a political dispute, with different times being used depending which side one is on, like Xinjiang. So just knowing the place and local time isn't enough.

Re:RFC 3339 vs. ISO 8601 by pizzafeelsright on Thursday August 31, 2023 @08:29PM (#37345335)
Suddenly, specifying noon on the third Tuesday on the second full moon after the summer equinox makes sense.
Re:RFC 3339 vs. ISO 8601 by runarberg on Friday September 01, 2023 @12:03AM (#37346674)
Solar noon or clock noon? What happens if the full moon is on Tuesday? Will that Tuesday count towards the third? Even if the full moon is at 23:59 (23:59 in which timezone)? Do you use solar equinox, or the Julian equinox, or the Gregorian equinox?

I think you need to be more specific here.

Re:RFC 3339 vs. ISO 8601 by joquarky on Friday September 01, 2023 @12:58AM (#37346946)
I wonder what the downsides would be in a time model that is indicated by a normalized global value for the current longitude where the sun is at meridian.