knadh / dns.toys

A DNS server that offers useful utilities and services over the DNS protocol. Weather, world time, unit conversion etc.
https://www.dns.toys
MIT License
2.48k stars 135 forks source link

support for epoch conversions #43

Closed aneeraj closed 1 year ago

aneeraj commented 1 year ago

Adds the functionality to convert epoch time to human readable.

% dig 784783800.epoch @127.0.0.1 -p 5354

;; QUESTION SECTION:
;784783800.epoch.       IN  A

;; ANSWER SECTION:
784783800.      1   IN  TXT "1994-11-14 03:30:00 +0000 UTC" "1994-11-14 09:00:00 +0530 IST"

closes #39

knadh commented 1 year ago

Thanks for the PR @aneeraj. I've added a config option to the service to make local time optional https://github.com/knadh/dns.toys/commit/89676de1332498c84c676273b9127e7b1a4ed55f

The server's (like the dns.toys public DNS server) timezone will mostly be irrelevant to the end user who's querying.