On Mon, Aug 13, 2001 at 09:02:38AM -0400, John Peacock wrote:
> David Cantrell wrote:
> > TZ does if you are dealing with April 22 in London and April 7 in NZ,
> > for instance.  Is that 14, 15 or 16 days?
>                                      Or, my US-centric worldview 
> excluded the possibility that daylight savings time could begin on
> different dates in different locations. :~)

If you're interested in the number of days (or rather, the number of
approximately 24-hour periods) then DST really doesn't matter, as at the
most you'll be off by two hours.  But if timezones are involved, you could
be off by up to a day (and it could be an off-by-one or off-by-minus-one
error depending on which direction you're travelling) if dealing with
places either side of the IDL.

> I would suggest that all dates be normalized to UTC (noon was mentioned
> in another posting as an appropriate time) prior to calculation, then 
> restored to local time for output.

Yes.  You then get time differences as well as date differences for free.

-- 
David Cantrell | [EMAIL PROTECTED] | http://www.cantrell.org.uk/david

Do not be afraid of cooking, as your ingredients will know and misbehave
   -- Fergus Henderson

Reply via email to