[tz] FW: Beginner's help request

Daniel Ford dfnojunk at gmail.com
Wed Nov 22 02:05:52 UTC 2017


Thanks Zefram and Paul for your ongoing assistance.  I managed to find
versions of zic.exe and zdump.exe that run in my Windoze environment (using
GygWin64), and have played with them a little to see what they do (the
documentation is a bit sparse).  Zic produces binary data that looks like it
will be of little use to me (since I don't know what it is!), but zdump
produces a potentially useful ASCII output.

Given that there's no simple way of finding the source file for a given
region/city, I guess the logical thing to do is concatenate all the source
files into one, and search that for the desired region/city.  So I delved
into Makefile and extracted the line that specifies the source files
(PRIMARY_YDATA= africa antarctica asia australasia europe northamerica
southamerica) and concatenated those files.  I presume this set of files is
unlikely to change in the foreseeable future?

But zdump produces DST output in 'absolute date' form rather than the
'current rules' I'm looking for.  The Arduino code (by Jack Christensen) I'm
planning to use (since it's so well-written and does all the timekeeping and
DST computation I need) runs on 'rules' (as indicated in my first post on
14-Oct-2017), not absolute dates, so I still need something that extracts
current rules from TZdb, not absolute change date/times.

But I think I can now extract those rules from the concatenated source
files, using a parsing method much as I described in my 31-Oct-2017 post,
modified as per Zefram's comments on 1-Nov (maybe 31-Oct in his timezone).

And as Zefram said, most of this pre-processing can be done on my server.
So a clock would simply send a query to my server (here's an equivalent
human interaction!): "Have my rules changed in the last week?", and the
server would reply either: "No, keep using your current rules" or "Yes, here
are your new rules."
Another issue to be decided is how my server checks your server, perhaps
weekly, for updates.  Paul mentioned 'get the Last-Modified: header', but
I'm not sure what that is and how my server would get it.  Ideally there's a
way for a server to find out whether the TZdb has been updated without
having to download files first.

Regards,
Daniel



More information about the tz mailing list