Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually useful: IANA timezone database over DNS #18

Open
orent opened this issue Jun 13, 2022 · 4 comments
Open

Actually useful: IANA timezone database over DNS #18

orent opened this issue Jun 13, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@orent
Copy link

orent commented Jun 13, 2022

Look up the current UTC offset, the next switching date/time and the UTC offset after the switch for a named time zone.

DNS is actually a very efficient way to distribute this small but important pieces of information. If this is done on a zone attached to a real TLD it could instruct recursive DNS servers to set a very long expiration time. It can also pass through many firewalls.

@knadh knadh added the enhancement New feature or request label Jun 13, 2022
@knadh
Copy link
Owner

knadh commented Jun 13, 2022

I'm a bit confused. Could you give an example query + responses?

@bortzmeyer
Copy link

% dig asia/jakarta.timezone @dns.toys
"UTC+7"

% dig nextswitch.europe/paris.timezone @dns.toys
"2022-10-02T02:00:00"

With short names:

% dig PST.timezone @dns.toys
"UTC+5"

(It is not an error: names of time zones are not unique and PST is Pakistan Standard Time but also possibly two other zones. That's why it is better to use long names.)

@knadh
Copy link
Owner

knadh commented Sep 27, 2022

That would indeed be useful. I'll try and do it at some point, but in the meanwhile, if anyone's willing to send a PR, please do!

@bortzmeyer
Copy link

That would indeed be useful. I'll try and do it at some point

Note that parsing the IANA timezone database for things like the transitions is not an easy task. Certainly not a two-hour job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants