[tz] Beginner's help request

Brian Inglis Brian.Inglis at SystematicSw.ab.ca
Thu Oct 19 06:39:36 UTC 2017


On 2017-10-18 18:08, Daniel Ford wrote:
> Thanks guys - you've all been extremely helpful, and I appreciate it.  I've
> been trying to conceive an algorithm for finding the 'current' rules for a
> locale, based on its 'reference city', and you've helped clarify what that
> will involve, though I'm not there yet.

That work is already done in zic where stringzone() generates a POSIX envvar.

You could cut down zic to do only what it needs to generate a POSIX envvar in
stringzone, and output the zone name and envvar as your desired end product.

You are only interested in the zones in zone1970.tab and tzselect shell script
shows what you need to do for zone selection.

The UI is the only place you may need zone names, but RC and GPS world time zone
watches just use 48 airport codes for selection and display.

Handling a POSIX TZ string is shown in Bill Plauger's "The Standard C Library",
but will need updated to support new POSIX <...> quoting syntax used in tz.

> Thanks also for the pointer to Africa/Casablanca as one of the known
> '4-transitions' localities.  And I liked the timeanddate visualisation,
> Matt.  (Timeanddate has long been my 'goto' site for world time info and
> calculators.)
> 
> So now I've opened the 'africa' file and searched for Africa/Casablanca, but
> I only see *two* rules for 2017.  So how does the TZdb indicate that there
> are *four* transitions this year?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada



More information about the tz mailing list