Re: [MacPerl-Porters] MacPerl daylight saving time issue
[email protected] (Matthias Neeracher) Wed, 18 Sep 2002 10:12:05 -0600
| Newsgroups | perl.macperl.porters |
|---|---|
| Message-ID | <[email protected]> |
On Wednesday, September 18, 2002, at 12:38 AM, Peter Prymmer wrote:
> Actually I do not think that your Christmas Eve example was bad. Yes
> daylight savings time rules may be complicated but it "should not" be
> impossible to code around
Not impossible, but rather hard. At some point, it also would become a
question of how much code to add to a general purpose library just to
handle a special case which is not handled on many commercial platforms
either.
> (I say that as someone who has never attempted
> to modify GUSI). I note that for the "Date & Time" control panel
> version
> 8.3 that ships with Mac OS 9.1 there is a checkbox for "Set
> Daylight-Saving Time Automatically", from which I conclude that parts
> of
> the system do know what time zone the Mac is in
Yes.
> and what the DST -> standard time -> DST calendar rules are.
Hmm, I can't check this from X, but doesn't the "Automatically" here
refer to getting the flag from a network time server? AFAIK, the last
time I checked, the three DST options available were:
- Click the checkbox yourself in spring and fall. This is obviously
unsuited to calculating future dates.
- Specify the switchover rules (2nd saturday in march) appropriate to
your location. This
would work, but there is no API to the rules.
- Get the DST setting from a network time server. This is also
unsuited to calculating any DST setting except for the present.
Matthias