FW: accessing DST rules at runtime

Olson, Arthur David (NCI) olsona at dc37a.nci.nih.gov
Mon Apr 19 15:41:05 UTC 1999



-----Original Message-----
From:	Dave Hackenyos [SMTP:hackenyo at roguewave.com]
Sent:	Friday, April 16, 1999 8:12 PM
To:	ado at elsie.nci.nih.gov
Subject:	accessing DST rules at runtime

Hello,
    I have been working on an implementation problem about which you may
have some insight. I hope you don't mind a question or two.
    I am attempting to discover a way to query any (most) Operating
Systems about what it may think the daylight rule is for the Timezone in
which it thinks it is located. I wish to do this at runtime. I am aware
that a call to tzset() will set a host of information, but only a few
are available to the programmer (tzname, daylight, etc). I cannot find a
way to get at the exact DST rule information even though the system is
well aware of it during every call of localtime().
    Your tar files at elsie.nci.nih.gov are full of info about the
subject and several, if not all platforms of interest to me use it. Your
localtime() function seems to know  how to parse these binary zoneinfo
files, but once again, I am unable to discern how to access the DST rule
info for my own use.
    My question: Could you shed some light on how (given knowledge of
the path to a particular OS's zoneinfo location) one could gleen the DST
rule at runtime? I would be forever in your debt.

Thanks for any help you could send my way,
Dave Hackenyos
hackenyo at roguewave.com
(541)754-2976



More information about the tz mailing list