Open orent opened 2 years ago
I'm a bit confused. Could you give an example query + responses?
% 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.)
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!
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.
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.