The time may well exist, perhaps twice!
Consider 00:10 on the morning AFTER a DST change.
What is the time (or more specifically, the date) now - 1day?
What is the time now - 24hr?
utilities like find -mtime -1 don't return an error if there happens to
have been a DST change in the last 23-25 hrs.
The use of pmdate -anything is suspect in pmlogger_daily ... imho it is
cleaner to remove the use of pmdate in that context and leave pmdate to
be quietly ignorant and confused in this corner case.
On Tue, 2008-11-25 at 11:20 +1100, Mark Goodwin wrote:
>
> Nathan Scott wrote:
> > On Tue, 2008-11-25 at 10:38 +1100, Ken McDonell wrote:
> >> I believe the problem is in pmdate -1d when you're within an hour of
> >> midnight and there was a DST adjustment in the previous 23-25 hrs ...
> >> there is no good answer here, pmdate cannot produce the 100% right
> >> answer no matter what.
> >
>
> pmdate should return an error when the date/time it is being asked
> to report does not exist in the local timezone. (sounds like SciFi,
> but it's a real "temporal discontinuity"). The error would have
> to be handled all the way out to pmlogger_daily et al.
>
> Cheers
> -- Mark
|