From & To rule fields

Jesper Norgaard Welen jnorgard at prodigy.net.mx
Sat Dec 2 19:15:23 UTC 2006


Philip,

my comments below

>Philip Warner [pjw at rhyme.com.au] wrote:
>I'd like to clarify which year should be compared in from/to fields 
>for rules (and zone lines). It seems reasonable that the AT field 
>determines which year is to be compared 
>(wallclock, utc or standard) -- is that correct?

This is really quite simple because we don't allow AT field -1:00 
(the day before) or even 24:00 (because some C compilers won't support
it) so the year is always what the rule specifies, in the below 2
rules 1999 and 2000. However, if using u or s then effectively we could
be talking about *local* time of another day, even another year.
Yes, the AT field determines which year, that's correct.

>To give specific example:

>Rule    Test    1999    only    -    Jan    1     0:00    2:00    -
>Rule    Test    2000    only    -    Jan    1     0:00    0:00    -

>These are both wallclock rules, and suppose they are used in a 
>region that is GMT+5. Then at UTC  31-Dec-1999 17:00 the WC time 
>will turn to midnight....is that the point at which the clocks 
>would be adjusted?

This is a bit weird, you are specifying in the first rule that at 0:00
1-Jan-1999 (local time) you are setting the clock 2 hours ahead, e.g.
it will be GMT+7, starting year 1999 effectively at 2 o'clock ...
This would be at UTC 31-Dec-1998 19:00 (5 hours before) ... when local
time effectively changes from midnight to 2 in the morning.
The next rule states that at UTC 31-Dec-1999 17:00 (local midnight) the
clock is set 2 hours back again. So your interpretation are not correct,
since wall clock will not turn to midnight, it will rather leave it!
Note that in the example you would celebrate New Year twice from 1999
to 2000 in your local place! So in effect, you might mean the right thing
although I don't like the formulation.

>And if so, in the following example:

>Rule    Test    1999    only    -    Jan    1     0:00    2:00u    -
>Rule    Test    2000    only    -    Jan    1     0:00    0:00u    -

>would the clocks adjust at UTC time 1-Jan-2000?

Here the AT field is 0:00 but the SAVE field is 2:00u - this is not possible
as the u or s postfixes belong in the AT field.

Suppose you had written the rules like this:

Rule    Test    1999    only    -    Jan    1     0:00u    2:00    -
Rule    Test    2000    only    -    Jan    1     0:00u    0:00    -

Then if we presume GMT+5 then effectively the change takes place UTC 0:00
1-Jan-1999, e.g. at 5:00 1-Jan-1999 local time, where the clock is set 
forward 2 hours. Then at UTC 0:00 1-Jan-2000, the clock is set backward 
2 hours, from local time 7:00 1-Jan-2000 to 5:00 1-Jan-2000.

Note that in all cases I presume that there were no previous adjustments to
local time, which would alter the calculations.

I hope this clarifies the use for you ...




More information about the tz mailing list