Java Forum / General / March 2008
Daylight saving come up soon
Roedy Green - 07 Mar 2008 09:59 GMT For North Americans daylight saving starts Sunday March 9.
On daylight saving switch days, dont set your computer clock forward an hour! Instead, make sure your machine is configured to the correct time zone, and reset your clock from an atomic time source. It will automatically jump at 2 AM. If you fiddle the clock, you will screw up the file timestamps which are kept in timezone-independent, DST-independent, GMT aka UTC. To make sure your timezone is configured correctly, and to set your clock from an atomic timesource, use the SetClock utility. http://mindprod.com/webstart/setclock.html
It works only for windows. With a tiny bit of JNI it would also work on other platforms. Hint Hint.
For background see:
http://mindprod.com/jgloss/dst.html http://mindprod.com/jgloss/timezone.html http://mindprod.com/jgloss/timesources.html
--
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Nigel Wade - 07 Mar 2008 10:52 GMT > It works only for windows. With a tiny bit of JNI it would also work > on other platforms. Other platforms don't need hackery to the system clock to deal with DST. Only Microsoft/Windows is daft enough to operate in wall-clock time.
> Hint Hint. Quite.
 Signature Nigel Wade, System Administrator, Space Plasma Physics Group, University of Leicester, Leicester, LE1 7RH, UK E-mail : nmw@ion.le.ac.uk Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Mark Thornton - 07 Mar 2008 21:18 GMT >> It works only for windows. With a tiny bit of JNI it would also work >> on other platforms. > > Other platforms don't need hackery to the system clock to deal with DST. Only > Microsoft/Windows is daft enough to operate in wall-clock time. Current versions of Windows use UTC internally.
Windows 9x and ME are not supported anymore.
Mark Thornton
Roedy Green - 07 Mar 2008 23:07 GMT >Other platforms don't need hackery to the system clock to deal with DST. Only >Microsoft/Windows is daft enough to operate in wall-clock time. I believe NT, 2000 and Vista all work internally on GST/UTC. They will automatically handle DST. All you need do is ensure the timezone is correctly configured and the UTC base time is correct. Previously they worked on raw wall clock time. --
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Nigel Wade - 10 Mar 2008 12:56 GMT >>Other platforms don't need hackery to the system clock to deal with DST. Only >>Microsoft/Windows is daft enough to operate in wall-clock time. > > I believe NT, 2000 and Vista all work internally on GST/UTC. They > will automatically handle DST. All you need do is ensure the timezone > is correctly configured and the UTC base time is correct. Windows has managed to handle DST without any problems since, IIRC, 95. Timezone setup is part of the installation procedure. If your PC is misconfigured with the wrong timezone then you can easily fix it via the normal Windows GUIs.
> Previously they worked on raw wall clock time. Last I heard all versions of Windows still set the BIOS clock to wallclock time not UTC, and messed with the BIOS clock for DST. This is hackery to me. Is that not still the case?
 Signature Nigel Wade, System Administrator, Space Plasma Physics Group, University of Leicester, Leicester, LE1 7RH, UK E-mail : nmw@ion.le.ac.uk Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Roedy Green - 11 Mar 2008 03:44 GMT >Last I heard all versions of Windows still set the BIOS clock to wallclock time >not UTC, and messed with the BIOS clock for DST. This is hackery to me. Is that >not still the case? In Vista you change the timezone, the system time automatically changes so that the system time in UTC is preserved.
Also the file dates all change to the local timezone.
This implies the dates are stored in UTC.
In DOS they were just wall clock time.
In early Windows I think they were wall clock time in standard time, possibly wall clock time.
I just an email from the Winzip people saying they just use raw display dates and will stay that way since so few people have complained.
--
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Dr J R Stockton - 12 Mar 2008 17:00 GMT In comp.lang.java.programmer message <57sbt31c59nvtgdd7bam9j5obpooejlt74 @4ax.com>, Tue, 11 Mar 2008 02:44:50, Roedy Green <see_website@mindprod. com.invalid> posted:
>>Last I heard all versions of Windows still set the BIOS clock to wallclock time >>not UTC, and messed with the BIOS clock for DST. This is hackery to me. Is that >>not still the case? > >In Vista you change the timezone, the system time automatically >changes so that the system time in UTC is preserved. One does not select the time zone directly; one selects the Time Rules, by choosing a set of locations. Iceland, the British Isles, and Senegal are all in the same Time Zone, but the BI Rules differ from the others. Ottawa and Lima are in the same zone, but have different Rules.
 Signature (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Delphi 3 Turnpike 6.05 <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links; <URL:http://www.bancoems.com/CompLangPascalDelphiMisc-MiniFAQ.htm> clpdmFAQ; <URL:http://www.borland.com/newsgroups/guide.html> news:borland.* Guidelines
Gordon Beaton - 07 Mar 2008 11:19 GMT > It works only for windows. With a tiny bit of JNI it would also work > on other platforms. Hint Hint. Other platforms use ntp.
/gordon
--
Thomas Kellerer - 07 Mar 2008 12:13 GMT Gordon Beaton, 07.03.2008 12:19:
>> It works only for windows. With a tiny bit of JNI it would also work >> on other platforms. Hint Hint. > > Other platforms use ntp. Windows has ntp as well.
Roedy Green - 07 Mar 2008 23:11 GMT On Fri, 07 Mar 2008 13:13:34 +0100, Thomas Kellerer <YQDHXVLMUBXG@spammotel.com> wrote, quoted or indirectly quoted someone who said :
>Windows has ntp as well. It does not seem to work. I think the problem is MS has only one time server, and it is too busy.
I use the Windows NTP, SetClock http://mindprod.com/jgloss/webstart/setclock.html and double check everything with radio controlled "atomic" clock on my desk. see http://mindprod.com/jgloss/radiosynchedclock.html http://mindprod.com/jgloss/bgloss/wallclock.html
--
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Jeff Higgins - 07 Mar 2008 23:43 GMT > On Fri, 07 Mar 2008 13:13:34 +0100, Thomas Kellerer > <YQDHXVLMUBXG@spammotel.com> wrote, quoted or indirectly quoted [quoted text clipped - 4 lines] > It does not seem to work. I think the problem is MS has only one time > server, and it is too busy. Change the server?
> I use the Windows NTP, SetClock > http://mindprod.com/jgloss/webstart/setclock.html > and double check everything with radio controlled "atomic" clock on my > desk. see http://mindprod.com/jgloss/radiosynchedclock.html > http://mindprod.com/jgloss/bgloss/wallclock.html Roedy Green - 07 Mar 2008 23:50 GMT On Fri, 7 Mar 2008 18:43:02 -0500, "Jeff Higgins" <oohiggins@yahoo.com> wrote, quoted or indirectly quoted someone who said :
>> It does not seem to work. I think the problem is MS has only one time >> server, and it is too busy. > >Change the server? I don't think you can. It is built-in to Vista. --
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Arne Vajhøj - 08 Mar 2008 00:09 GMT > On Fri, 7 Mar 2008 18:43:02 -0500, "Jeff Higgins" > <oohiggins@yahoo.com> wrote, quoted or indirectly quoted someone who [quoted text clipped - 4 lines] > > I don't think you can. It is built-in to Vista. net time /set /yes
should be able to set the time from a time server (not necessarily Windows based) on the network.
Arne
Peter Duniho - 08 Mar 2008 00:15 GMT >>> It does not seem to work. I think the problem is MS has only one time >>> server, and it is too busy. >> >> Change the server? > > I don't think you can. It is built-in to Vista. Granted, I haven't used Vista on a regular basis. But looking at, for example, this page -- http://www.howtogeek.com/howto/windows-vista/dealing-with-windows-vista-time-syn c-problems/ -- it appears to me that the Vista Internet Time UI is exactly the same as it was in XP.
You can type the name of whatever server you want into the control.
A good thing for people to remember: "just because you hate Windows, that doesn't mean you have a clue about how it works".
Pete
Jeff Higgins - 08 Mar 2008 00:27 GMT > On Fri, 7 Mar 2008 18:43:02 -0500, "Jeff Higgins" > <oohiggins@yahoo.com> wrote, quoted or indirectly quoted someone who [quoted text clipped - 6 lines] > > I don't think you can. It is built-in to Vista. Sure you can; <http://preview.tinyurl.com/33gdvk> keeping in mind; <http://preview.tinyurl.com/33fpso>
Roedy Green - 08 Mar 2008 09:03 GMT On Fri, 7 Mar 2008 19:27:22 -0500, "Jeff Higgins" <oohiggins@yahoo.com> wrote, quoted or indirectly quoted someone who said :
>> I don't think you can. It is built-in to Vista. > >Sure you can; ><http://preview.tinyurl.com/33gdvk> >keeping in mind; ><http://preview.tinyurl.com/33fpso> thanks. I have added those links to http://mindprod.com/jgloss/vista.html --
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Arne Vajhøj - 08 Mar 2008 00:08 GMT > For North Americans daylight saving starts Sunday March 9. > [quoted text clipped - 9 lines] > It works only for windows. With a tiny bit of JNI it would also work > on other platforms. Hint Hint. I can not see any point in this utility.
Windows changes DST automatically and has done so for many years.
Arne
Roedy Green - 08 Mar 2008 09:04 GMT >I can not see any point in this utility. > >Windows changes DST automatically and has done so for >many years. But it doesn't work reliably. Try setclock and you will see. --
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Roedy Green - 08 Mar 2008 09:50 GMT On Sat, 08 Mar 2008 09:04:12 GMT, Roedy Green <see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted someone who said :
>>Windows changes DST automatically and has done so for >>many years. > >But it doesn't work reliably. Try setclock and you will see. IF you have the timezone configured, it does the DST flip if you have the latest updates installed. On some Windows it is a manual update to deal with the change in rules.
However, I could never get the auto NTS update to work with the MS time server. I will try it with another. My time would drift many seconds off. --
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Martin Gregorie - 08 Mar 2008 11:29 GMT > On Sat, 08 Mar 2008 09:04:12 GMT, Roedy Green > <see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted [quoted text clipped - 11 lines] > time server. I will try it with another. My time would drift many > seconds off. There are advantages to being free from the Dark Side. I've run ntp for years on my Linux systems, My internet time sources are the European and Pacific timeserver pools and, a historic hang-over from my dial-up days and RedHat 6.2, I have a home built receiver for the Rugby MSF time signal configured as a tier 2 source.
Jonathon Buzzard designed the hardware and wrote a shared-memory ntpd interface for it. The hardware cost GBP 30 ($US 60) and took barely a couple of hours to assemble and test. Its powered from the serial port. See http://www.buzzard.me.uk/jonathan/radioclock.html for details.
 Signature martin@ | Martin Gregorie gregorie. | Essex, UK org |
Karl - 09 Mar 2008 01:09 GMT >> On Sat, 08 Mar 2008 09:04:12 GMT, Roedy Green >> <see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted [quoted text clipped - 22 lines] > couple of hours to assemble and test. Its powered from the serial port. > See http://www.buzzard.me.uk/jonathan/radioclock.html for details. I have never had problems with any Windows NT-based system including, NTP, DST, time zones, etc.
I have a Java weather data acquisition application that I happen to be running on Windows XP, and it sails right through DST time changes with no trouble at all, and stays synchronized with time.windows.com or any other NTP server I happen to choose.
http://mysite.verizon.net/Karl_Uppiano/weather.html http://mysite.verizon.net/Karl_Uppiano/wxservice.html
There are minor difficulties if the hardware timebase is not accurate, causing wind speed anomalies when it syncs with network time, but that isn't Windows' fault.
Roedy Green - 09 Mar 2008 11:32 GMT >I have never had problems with any Windows NT-based system including, NTP, >DST, time zones, etc. By that do you mean you cross checked with a radio synched clock, a web atomic clock etc. or just that it behaved within a minute or two to the time on the TV?
--
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Karl - 09 Mar 2008 22:38 GMT >>I have never had problems with any Windows NT-based system including, NTP, >>DST, time zones, etc. > > By that do you mean you cross checked with a radio synched clock, a > web atomic clock etc. or just that it behaved within a minute or two > to the time on the TV? Most of the computers I have used to test my software remain accurate to the second in comparison with a radio sync clock. They synchronize weekly with NTP.
Windows uses the system timer hardware interrupt as a time base for time of day functions. Since the system timer is a shared resource (on any system), there are some cases where conflicts can arise. Operating systems have to be aware if an application reprograms the timer, and notify all interrupt handlers so that they can all can change their calculation constants. If the clock is run at too high a resolution, interrupts can be missed, and time of day accuracy suffers. Furthermore, the setting might be incompatible with some handlers (usually too slow). If the timer is reprogrammed frequently, some counts can fall through the cracks while the interrupt handlers scramble to adapt. Some of these issues might be considered bugs, but some are unavoidable. This bug (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4500388) is probably due to Java reprogramming the system timer.
In addition to programming issues, the accuracy of the hardware crystal time base affects how much the computer time will drift. Any drift will cause a discontinuity when it syncs with NTP. If the discontinuity is large enough, in my application it can adversely affect time-critical wind speed measurements. In that case, the work-around is to sync more frequently, so the discontinuity is less. Or, do not sync automatically, and manually sync the clock during system maintenance.
Here is an article that describes some timing considerations in Windows. http://msdn2.microsoft.com/en-us/magazine/cc163996.aspx. Note that similar considerations apply for other operating systems. In our case, we hope the Java VM implementation can virtualize differences between platforms.
Arne Vajhøj - 09 Mar 2008 23:23 GMT >> I have never had problems with any Windows NT-based system including, NTP, >> DST, time zones, etc. > > By that do you mean you cross checked with a radio synched clock, a > web atomic clock etc. or just that it behaved within a minute or two > to the time on the TV? Actually I am not sitting at that time and looking at the monitors ...
:-) But it works fine the day after.
And if you consider how time is implemented in modern computers then there is really no way it can go wrong.
Because time is not changed at all. The offset that is applied when formatting the time for output or parsing the time in input is changed.
And the offset must be dynamicly calculated based on the not changed UTC time.
Arne
Karl - 10 Mar 2008 01:16 GMT >>> I have never had problems with any Windows NT-based system including, >>> NTP, DST, time zones, etc. [quoted text clipped - 18 lines] > And the offset must be dynamicly calculated based on the > not changed UTC time. Yes, a single variable increasing monotonically, referenced to e.g., 1970, 01, 01, 00:00:00 UTC is the right way to do it. If a hardware interrupt handler loses time incrementing a single variable every 10 msec, then we have much bigger problems than time of day.
If the government would quit fiddling with DST all the time, we wouldn't even need patches for time zone database localization.
Roedy Green - 10 Mar 2008 05:52 GMT >And if you consider how time is implemented in modern >computers then there is really no way it can go wrong. You'd think that, but on my Vista Home Premium Acer machine the fool thing jumped TWO hours ahead automatically. --
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Martin Gregorie - 09 Mar 2008 20:43 GMT > I have never had problems with any Windows NT-based system including, NTP, > DST, time zones, etc. How easy would it be to port the Jonathon Buzzard's shared memory interface? The *NIX version relies on the shared memory functions in the SVR4 Inter Process Communication package. C, not Java of course!
> There are minor difficulties if the hardware timebase is not accurate, > causing wind speed anomalies when it syncs with network time, but that isn't > Windows' fault. Has XP done away with the older Windows trick of copying the HW clock registers into memory, updating them on the 18 ticks/second timed interrupt and ignoring the HW clock until next reboot?
That was responsible for quite a lot of clock drift since, when Windows got busy it tended to miss the timer ticks.
 Signature martin@ | Martin Gregorie gregorie. | Essex, UK org |
Roedy Green - 09 Mar 2008 21:29 GMT On Sun, 09 Mar 2008 19:43:58 +0000, Martin Gregorie <martin@see.sig.for.address> wrote, quoted or indirectly quoted someone who said :
>Has XP done away with the older Windows trick of copying the HW clock >registers into memory, updating them on the 18 ticks/second timed >interrupt and ignoring the HW clock until next reboot? java.lang.System.currentTimeMillis nominal resolution is measured in ms. It seems to me I have seen resolution higher than 18 ticks a second, so at least that must to looking at a higher resolution timer.
It seems to me I noticed something around the time of NT that lead me to believe system time was being handled more accurately, but that was a long time ago and I can't recall details.
I recall though dealing with ticks and lost ticks in DOS.
You could do an experiment to see if java.lang.System.currentTimeMillis returns numbers in some non-1-ms multiple.
System.nanotime is using the instruction counter clock.
--
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Martin Gregorie - 11 Mar 2008 01:46 GMT > On Sun, 09 Mar 2008 19:43:58 +0000, Martin Gregorie > <martin@see.sig.for.address> wrote, quoted or indirectly quoted [quoted text clipped - 13 lines] > > I recall though dealing with ticks and lost ticks in DOS. AFAIK that method persisted as long as Windows was a graphical shell for DOS, i.e. up to the demise of ME. I would hope that NT and its successors used a better method, but you never know with Redmond - there's far too much NIH syndrome in that organization for my taste.
 Signature martin@ | Martin Gregorie gregorie. | Essex, UK org |
Arne Vajhøj - 09 Mar 2008 02:22 GMT >> I can not see any point in this utility. >> >> Windows changes DST automatically and has done so for >> many years. > > But it doesn't work reliably. It has always worked reliable for me.
And if you read some of the other comments, then it is apparently also working reliable for others.
Arne
Dr J R Stockton - 08 Mar 2008 23:11 GMT In comp.lang.java.programmer message <rb22t3hh8skch17as5jn922ae19a79e159 @4ax.com>, Fri, 7 Mar 2008 09:59:22, Roedy Green <see_website@mindprod.c om.invalid> posted:
>For North Americans daylight saving starts Sunday March 9. > >On daylight saving switch days, don’t set your computer clock forward >an hour! Instead, make sure your machine is configured to the correct >time zone, and reset your clock from an atomic time source. It will >automatically jump at 2 AM. Some North Americans do not have Summer Time.
NRC thinks that Newfoundland changes at 00:01 clock time (which IMHO gives a risk of advancing the date, in Autumn, twice).
I believe that Mexico is in North America, and uses different dates. I believe that Greenland is in North America, and uses different dates.
<http://www.worldtimezone.com/daylight.htm>.
Caveat : I think they are inaccurate about Europe, in that there are non-EU non-Russian parts of Europe which follow the Russian times.
 Signature (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036) Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
Arne Vajhøj - 09 Mar 2008 02:20 GMT > In comp.lang.java.programmer message <rb22t3hh8skch17as5jn922ae19a79e159 > @4ax.com>, Fri, 7 Mar 2008 09:59:22, Roedy Green <see_website@mindprod.c [quoted text clipped - 8 lines] > I believe that Mexico is in North America, and uses different dates. > I believe that Greenland is in North America, and uses different dates. He probably just meant USA and Canada.
Arne
Roedy Green - 09 Mar 2008 06:23 GMT >He probably just meant USA and Canada. For details of what I meant, see http://mindprod.com/jgloss/dst.html --
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Martin Gregorie - 09 Mar 2008 20:56 GMT >> He probably just meant USA and Canada. > For details of what I meant, see http://mindprod.com/jgloss/dst.html GPS is useful as a time source as well as setting your location, which only happens once per OS install. It can provide a time standard that's been cleared of propagation delays because the GPS receiver must have such a cleaned time in order to work at all.
This is unlike all other common time sources such as radio broadcast time (WWV, MSF, etc) and internet time sources, which must all be corrected for propagation delays before they can be considered accurate. Unless, of course, its a broadcast time source and you're fairly close to the transmitter.
 Signature martin@ | Martin Gregorie gregorie. | Essex, UK org |
Gordon Beaton - 10 Mar 2008 08:13 GMT > GPS is useful as a time source as well as setting your location, > which only happens once per OS install. It can provide a time > standard that's been cleared of propagation delays because the GPS > receiver must have such a cleaned time in order to work at all. Even with a GPS there are factors to consider:
- At the NMEA standard bitrate of 4800 bps, it takes nearly 100ms just to send a short sentence like ZDA (date and time).
- Some GPS units only send data at specific intervals, not necessarily at the exact time the data was ready, and it gets worse if the unit has a lot of data to send at a particular moment.
So when was that timestamp you just read from the device actually taken?
/gordon
--
Martin Gregorie - 11 Mar 2008 01:57 GMT >> GPS is useful as a time source as well as setting your location, >> which only happens once per OS install. It can provide a time [quoted text clipped - 12 lines] > So when was that timestamp you just read from the device actually > taken? Fair points. MSF with a home-built 30 quid receiver takes a lot of beating. However, if you're outside the broadcast service areas I reckon a consumer GPS receiver running off a wall-rat PSU has a pretty good cost/performance ratio. Its main drawback is that you can only get UTC from it, so you'd better not be using a system that sets its HW clock to locale time.
Lets face it - if you're really bothered about time you'll have an on-site atomic clock and many $$$$ worth of synchronization kit to go with it.
 Signature martin@ | Martin Gregorie gregorie. | Essex, UK org |
Dr J R Stockton - 09 Mar 2008 21:02 GMT In comp.lang.java.programmer message <47d3495c$0$90274$14726298@news.sun site.dk>, Sat, 8 Mar 2008 21:20:16, Arne Vajhøj <arne@vajhoej.dk> posted:
>> In comp.lang.java.programmer message <rb22t3hh8skch17as5jn922ae19a79e159 >> @4ax.com>, Fri, 7 Mar 2008 09:59:22, Roedy Green <see_website@mindprod.c [quoted text clipped - 8 lines] > >He probably just meant USA and Canada. (a) I go by what he wrote, not what he might have meant. (b) Newfoundland is a part of Canada.
 Signature (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. For news:borland.*, use their server newsgroups.borland.com ; but first read Guidelines <URL:http://www.borland.com/newsgroups/guide.html> ff. with care.
Arne Vajhøj - 11 Mar 2008 02:04 GMT > In comp.lang.java.programmer message <47d3495c$0$90274$14726298@news.sun > site.dk>, Sat, 8 Mar 2008 21:20:16, Arne Vajhøj <arne@vajhoej.dk> [quoted text clipped - 13 lines] > (a) I go by what he wrote, not what he might have meant. > (b) Newfoundland is a part of Canada. Yes - but what he wrote is true for Newfoundland, so that is not so relevant.
Arne
Dr J R Stockton - 12 Mar 2008 16:54 GMT In comp.lang.java.programmer message <47d5da8a$0$90268$14726298@news.sun site.dk>, Mon, 10 Mar 2008 21:04:17, Arne Vajhøj <arne@vajhoej.dk> posted:
>> In comp.lang.java.programmer message <47d3495c$0$90274$14726298@news.sun >> site.dk>, Sat, 8 Mar 2008 21:20:16, Arne Vajhøj <arne@vajhoej.dk> [quoted text clipped - 15 lines] >Yes - but what he wrote is true for Newfoundland, so that is >not so relevant. What he originally wrote is not true for Newfoundland. You should have read back further to avoid the risk of making a foolish response.
 Signature (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05. Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Arne Vajhøj - 13 Mar 2008 02:58 GMT > In comp.lang.java.programmer message <47d5da8a$0$90268$14726298@news.sun > site.dk>, Mon, 10 Mar 2008 21:04:17, Arne Vajhøj <arne@vajhoej.dk> [quoted text clipped - 20 lines] > What he originally wrote is not true for Newfoundland. You should have > read back further to avoid the risk of making a foolish response. Let me get this correct: - you want to criticize Roedy considering only what was quoted - you feel exempted from criticism because of something not quoted ?
Hmmmm.
It does not seem to be fairnes or intelligence that fill your life.
Arne
Arne
Roedy Green - 13 Mar 2008 05:56 GMT On Wed, 12 Mar 2008 15:54:53 +0000, Dr J R Stockton <jrs@merlyn.demon.co.uk> wrote, quoted or indirectly quoted someone who said :
>What he originally wrote is not true for Newfoundland. You should have >read back further to avoid the risk of making a foolish response. The only thing different about Newfoundland's DST is they flip at 12:01 AM rather than 2:00 AM. So I would hardly call his response "foolish".
There is also a series of running jokes about Newfoundland Standard time being UTC-3.5, but that is independent of DST.
It makes no practical difference for most people since the change the clocks before they go to bed, or it happens automatically while they sleep.
--
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Dr J R Stockton - 13 Mar 2008 21:31 GMT In comp.lang.java.programmer message <vhcht3dscr927vupnpvervk6cmmn6j2ci3 @4ax.com>, Thu, 13 Mar 2008 04:56:57, Roedy Green <see_website@mindprod. com.invalid> posted:
>On Wed, 12 Mar 2008 15:54:53 +0000, Dr J R Stockton ><jrs@merlyn.demon.co.uk> wrote, quoted or indirectly quoted someone [quoted text clipped - 6 lines] >12:01 AM rather than 2:00 AM. So I would hardly call his response >"foolish". But you referred to North America changing at 02:00. He has shown no sign of understanding the difference between 00:01 and 02:00. It may not affect many people, but it does exist.
 Signature (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05. Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Roedy Green - 09 Mar 2008 11:15 GMT On Fri, 07 Mar 2008 09:59:22 GMT, Roedy Green <see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted someone who said :
>For North Americans daylight saving starts Sunday March 9. My radio-synched desk clock ticked over as advertised. see http://mindprod.com/bgloss/radiosynchedclock.html
However Vista ticked over 2 hours. I will have a peek in BIOS. Perhaps it did a kick over too. --
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Roedy Green - 10 Mar 2008 03:26 GMT In modern operating systems including NT/W2K/XP/W2K3/Vista, after a daylight saving change, you will notice the file dates on all your files change by one hour.
This is as it should be!!
The actual dates are stored internally as GMT/UTC. The date displays the files last-modified moment in time using the current time scheme, not the time scheme in effect at the time the files were last modified. So for example if your file were dated 2008-01-01T09:00PST, that would be stored internally as 2008-01-01T17:00UTC, in other words 8 hours later, namely 17 hours after midnight on 2008-01-01 GMT/UTC. In the spring, you change to DST. Then the difference between PDT and GMT/UTC is only 7 hours, not 8. So that same instant in time would be 2008-01-01T10:00DST, even though DST was not in effect in January. In the spring, Vista will display dates in DST, one hour later than usual. In the fall, Vista will revert back to showing dates in PST, one hour earlier. Don't modify the dates to compensate! --
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Andreas Leitgeb - 10 Mar 2008 08:58 GMT > In modern operating systems including NT/W2K/XP/W2K3/Vista, after a > daylight saving change, you will notice the file dates on all your > files change by one hour. > This is as it should be!! No, it is not. (but it is still a progress to what the old windows versions did)
Given any GMT-datetime and the base timezone, it can be determined, whether that falls into the DST halfyear of the base timezone.
If on a spring day, just before the switch I create a file at twelve o'clock, then this time is converted to GMT for current timezone, and the GMT-seconds since epoch are stored with the file. Then, a week later, I list the file, the GMT-time that corresponded to twelve o'clock back then will be known to belong to a non-DST time, and thus be displayed as such. (though not on vista, as you described it)
It will assume the same timezone, but not the same DST.
At the time I write this, it is 1205133333 seconds since epoch I'm in central europe, so this time is displayed as: Mon Mar 10 08:15:33 CET 2008 in exactly 61 days (60*60*24*61 seconds), we will have already DST. If I add this to abovementioned seconds, it will give me: Sat May 10 09:15:33 CEST 2008 Yes, one hour later, of course, but with the extra "S", that flags DST.
If today were already summer, and current time would display as CEST, then displaying the date "1205133333 seconds since epoch" would still display "Mon Mar 10 08:15:33 CET 2008".
> The actual dates are stored internally as GMT/UTC. The date displays > the files last-modified moment in time using the current time > scheme, not the time scheme in effect at the time the files were last > modified. This only happens on systems, that do not separate timezone from DST. If your system doesn't know that "PDT" and "PST" are principially the same then it will in summer display winter-timestamps one hour off relative to what time it was back then.
Finally: If I were to move to western europe today, and took my computer with me, I would tell it my new timezone "WET", and *then* it would display above timestamp (which could be the access time stored with a file) as ..."07:15:33", which is correct. While the computer knows about DST even for older dates, it surely doesn't keep track about when I move to a different timezone. My faint guess is, that future systems might do even that, once wide distance mobility becomes a concern. But then, it really would have to display the back-then timezone together with the time. E.g. it would store the local timezone along with GMT-time for each file. The GMT time is one important piece of information, but it might also be interesting to know later, that some file was created in australia at midnight, not in europe during normal office hours :-)
Andreas Leitgeb - 10 Mar 2008 09:05 GMT > Given any GMT-datetime and the base timezone, it can be > determined, whether that falls into the DST halfyear of > the base timezone. Another sidenote: If I really didn't want the system to automatically handle DST, I could set my timezone to UTC-1 (for CET) or UTC-2 (for CEST), and it would then show exactly those effects you described on vista for PDT/PST.
Roedy Green - 10 Mar 2008 09:49 GMT On 10 Mar 2008 07:58:48 GMT, Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> wrote, quoted or indirectly quoted someone who said :
>Then, a week later, I list the file, the GMT-time that >corresponded to twelve o'clock back then will be known >to belong to a non-DST time, and thus be displayed as such. >(though not on vista, as you described it) What sparked this was a report about timestamps changing on XP I received in an email:
"When the time switches due to DST, the timestamps of all the files on my PC change by one hour. Im reminded of this twice a year when I run a backup script I have that calls xcopy. Im using Windows XP Pro SP2. I checked http://mindprod.com/jgloss/dst.html, but found no mention of this problem. Is there some way of preventing this from happening?"
I also noticed on my own machine that Winzip seemed to think many files that have not changed had changed, just after the DST flip on Vista. I presume Winzip mindlessly works off displayed local time, which would imply Vista had changed my file date displays.. I was not on the lookout for this prior to the switch, so I don't have direct evidence it did this. Perhaps I could figure it out my comparing dates of backups, backups in zips etc
On what OSes is this cleverer file classifying behaviouryou described exhibited?
The very idea of DST has always offended me, and horrified me once I realised all the protential for disaster and error it creates. The way we measure time should not be fiddled with. It is like dynamically redefining the gallon to provide a gas tax/subsidy. We should simply change business hours in the summer.
I had a friend, a railway buff, who called standard time "God's time" and like the railways refused to acknowldge DST.
Given the global village we now like in, I think we should start thinking about using UTC for any communication that could conceivably span time zones.
--
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Andreas Leitgeb - 10 Mar 2008 14:43 GMT ><avl@gamma.logic.tuwien.ac.at> wrote: >>Then, a week later, I list the file, the GMT-time that [quoted text clipped - 10 lines] > files that have not changed had changed, just after the DST flip on > Vista. ...
> On what OSes is this cleverer file classifying behaviouryou described > exhibited? I see it on linux (through the "date"-utility) and assume it's also that way on all unices.
> The very idea of DST has always offended me, and horrified me once I > realised all the protential for disaster and error it creates. The way > we measure time should not be fiddled with. Time is a beast :-) It starts that going round the sun takes a bizarre factor of 365.24... times longer than the rotation round earths own axis, and with that axis being not perpendicular to the trip around the sun...
The farther away from equator one is, the more varies the length of day throughout the year. DST is (imho) an appropriate means to account for that. If it weren't for all those lots of clocks/watches/... that still need to be adjusted manually, I'd even prefer a smooth switch, say five minutes every couple of days. It's like in the former days, when "morning" was declared by a cock who cried when the sun was coming up. It surely didn't cry at the same time every day :-)
> Given the global village we now like in, I think we should start > thinking about using UTC for any communication that could conceivably > span time zones. We must accept, that in this global village there is no time where all are awake at once. And since we already have timezones, we can just as well also have DST - at least in those parts of the world where length of daylight time varies enough that it matters.
Just recently they published a study, that DST costs a lot of energy, but I never trust any such studies except those I faked myself :-)
Lew - 10 Mar 2008 13:15 GMT > In modern operating systems including NT/W2K/XP/W2K3/Vista, after a > daylight saving change, you will notice the file dates on all your [quoted text clipped - 14 lines] > usual. In the fall, Vista will revert back to showing dates in PST, > one hour earlier. Don't modify the dates to compensate! That doesn't make sense. When DST is not in effect, one shouldn't apply the DST offset to the time. 2008-01-01T17:00:00Z will always correspond to 2008-01-01, 09:00 Pacific Time, because PDT does not apply on that date.
If Vista is incorrectly showing a Standard Time datetime as a Daylight Saving Time datetime, then it's a bug.
 Signature Lew
Andrew Thompson - 10 Mar 2008 12:25 GMT On Mar 7, 8:59 pm, Roedy Green <see_webs...@mindprod.com.invalid> wrote:
> For North Americans daylight saving starts Sunday March 9. <pointed dig> Which might be of relevance to North Americans but is of little (specific) interest to people who do not use the 'North American' ways of calculating DST, such as ..well, 1 billion+ Chinese, the Europeans, or anybody in the southern hemisphere. (etcetera..) <pointed dig *>
Admitedly, the original point of your question is just as relevant to any community on the planet that uses a pseudo-Julian (..Gregorian - I always get them mixed up) calender. But..
Try thinking *outside* the hemisphere (or at least, the north american part of it), Roedy. If anybody can, you should be able to (I mention that knowing you have had cause to visit the northern European countries, at the very least)!
( * I just could not resist that ;)
-- Andrew T. PhySci.org
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|