Greg Ercolano wrote:
Hmmm... What about on Windows?
Before I can do any tests, I have to first upgrade my Win2K box to SP4
before I can install the DST updates. That'll take a while.
WINDOWS DST RESULTS
-------------------
I verified you have to also reboot Windows after making the
DST change; it's the only way to make sure no programs running
have old DST information cached after you apply the fix.
I did a test proving this is the case..
TEST FOR DST CACHING IN THE C LIBRARY
-------------------------------------
I did the same test I did with linux (previous message) under Windows
using this small C program that runs ctime() in a loop:
---- snip
#include <stdio.h>
#include <windows.h> // WINDOWS
#include <time.h>
int main(int argc, char**argv) {
while ( 1 ) {
long lt; time(<);
fprintf(stderr, "ctime: %s", ctime(<));
Sleep(1000); // WINDOWS
}
}
---- snip
I compiled that, and left it lying around to do this test
to make sure it crossed into the new timezone correctly:
1) First I warped the clock to 1:55AM March 11,
putting the machine 5 minutes before the witching hour.
2) Then started the program in DOS window "A"; leaving it printing out
the date/time in a loop once a second.
3) I applied the DST changes (see below)
4) Then I ran a new instance of my date/time program in DOS window "B"
5) Then I waited for 2am to strike.
Just like in linux; Window "A" did NOT show the correct time;
it went on to show 2am as if the DST jump didn't happen.
But Window "B" did jump correctly; it 'sprang forward' straight
to 3am as it should.
So these results under windows are the same as Linux; the C library
caches the timezone info when the program starts up, so changes made
while programs are running are not 'seen' until the programs are restarted.
Which means the only way to be sure the fix gets applied correctly
is to restart all programs and daemons, which means *reboot*.
APPLYING THE WINDOWS DST FIX
----------------------------
There's different options for the various versions of Windows.
I have a win2K box, so this is what worked for me.
Under Windows, after I dug down through the Win2K SP4 upgrade
prerequisites, I ended up on this page that describes several ways
to apply the DST fix:
http://support.microsoft.com/kb/914387/en-us
One way is to download and run a little 'TZEDIT' gui that lets you
set the DST on/off times. I took this approach, as it was most
relevant to me.
Other ways included applying a rollup patch:
http://support.microsoft.com/kb/931836/
..which works if you have 2K server or XP, but not plain old 2K,
so I skipped this one. And there was also a wacky regedit approach
that looked totally insane, so I skipped that too.
Using 'TZEDIT' was easy; just don't miss the extra step where you
have to then go into the control panel and change the local timezone
to a different zone, then back to the current zone, to make the change 'stick'.
If you don't do that, the change won't really take effect. (I verified
this myself by forgetting to do it the first time! ;)
Anyway, there you have it. MTYEWTK about DST!!
--
Greg Ercolano, erco@(email surpressed)
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)
|