Relative to Beginning of Month or to End
Did a zdump. How to tell if timezone DST rules indicate counting relative to beginning of month ("2nd Tuesday") or to end of month (last Sunday for example). Extreme newbie. Does this info live in the source code?
On 07/06/2012 08:55 AM, Marvel, Jim (CPCOE) wrote:
Did a zdump. How to tell if timezone DST rules indicate counting relative to beginning of month ("2nd Tuesday") or to end of month (last Sunday for example). Does this info live in the source code?
That info does not live in the data given to zdump. It does live in the original source for that data, i.e., the source fed to zic. But zic discards it and it is not present in zic's output (i.e., in zdump's input). There is software that reverse-engineers the zic output and attempts to infer that info. It's not perfect, but it works fairly well in practice, at least for future time stamps where there is typically only one rule into the indefinite future. See the function calendar-time-zone-daylight-rules in GNU Emacs; there may be other examples but this is the one I'm familiar with.
I see it in the Rules files now, like "europe". Thanks also for the GNU-tip. Jim Marvel Software Engineer II Honeywell CMSS 8323 Lindbergh Court Sarasota FL 34243 Phone - 941.360.6209 (alt: 941.360.6213) Fax - 941.355.9241 jim.marvel@honeywell.com
-----Original Message----- From: Paul Eggert [mailto:eggert@cs.ucla.edu] Sent: Friday, July 06, 2012 2:01 PM To: Marvel, Jim (CPCOE) Cc: tz@iana.org Subject: Re: [tz] Relative to Beginning of Month or to End
On 07/06/2012 08:55 AM, Marvel, Jim (CPCOE) wrote:
Did a zdump. How to tell if timezone DST rules indicate counting relative to beginning of month ("2nd Tuesday") or to end of month (last Sunday for example). Does this info live in the source code?
That info does not live in the data given to zdump. It does live in the original source for that data, i.e., the source fed to zic. But zic discards it and it is not present in zic's output (i.e., in zdump's input).
There is software that reverse-engineers the zic output and attempts to infer that info. It's not perfect, but it works fairly well in practice, at least for future time stamps where there is typically only one rule into the indefinite future. See the function calendar-time- zone-daylight-rules in GNU Emacs; there may be other examples but this is the one I'm familiar with.
participants (2)
-
Marvel, Jim (CPCOE) -
Paul Eggert