I think that Chuck's calculation is best conceptualized as a two-step one.

First, there is UTC-to-local-standard time conversion and vice versa;
and Chuck has these two problems well in hand.

Second, there is standard-to-daylight time conversion and vice versa.
 The standard-to-daylight correction is applied iff the standard time
value falls within  the local daylight interval, which may be empty.
If it is non-empty,

o it begins at the STANDARD date-time at
   which daylight time begins, call if SB, and

o it ends at the DAYLIGHT date-time at
   which daylight time ends, call it DE.

Now, fortunately, SE, the standard date-time at which daylight time
ends, is just SE = DE -1.

The time component of these date-times is all but invariant.  Its
value is usually 0200, 2 AM for Americans.  Their calendar-date
components vary widely.

John Gilmore, Ashland, MA 01721 - USA

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to