From: Rhino on
Joshua Cranmer <Pidgeot18(a)verizon.invalid> wrote in news:hnuh8d$aro$1(a)news-
int2.gatech.edu:

> On 03/18/2010 08:34 PM, Rhino wrote:
>> I'm just retesting some date/time methods I wrote a while back and
>> noticed something odd. It's 8 PM Eastern time as I write this and the
>> date routines I have just retested tell me that it's actually 9 PM. Why
>> would that be?
>
> You probably don't have the up-to-date timezone data files for Java.
>
> See <http://java.sun.com/javase/tzupdater_README.html>.
>
This is the first I've heard of them. Downloading now....

> Yet another reason to tell politicians to stop messing with time: it
> makes the already complicated time system much more complicated in the
> programming world. For approximately no change in energy consumption.
>
> Actually, I wonder what the total cost is to adapt for a change in DST
> rules in terms of computer systems.
>
Point well taken. I share your concerns and doubts about the value of
making these DST changes. I have to wonder if the energy saved by some
businesses is not more than outweighed by the grief this causes our
industry.

But then politics is pretty much always the practice of robbing Peter to
pay Paul....


--
Rhino

--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: Roedy Green on
On Fri, 19 Mar 2010 00:34:28 +0000 (UTC), Rhino
<no.offline.contact.please(a)example.com> wrote, quoted or indirectly
quoted someone who said :

>Or have I got something wrong in my computer somewhere? I'm running XP
>and the system clock says it's 8 PM Eastern time and it is set to
>recognize Daylight Saving Time. But I may not have installed the update
>that handles the earlier changeover to Daylight Time. Perhaps that needs
>to be installed??

try SetClock to be sure your timezone and time are correct.
see http://mindprod.com/webstart/setclock.html

--
Roedy Green Canadian Mind Products
http://mindprod.com

Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, �How would I develop if it were my money?� I�m amazed how many theoretical arguments evaporate when faced with this question.
~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming.
From: Rhino on
Roedy Green <see_website(a)mindprod.com.invalid> wrote in
news:upc6q5tvj8db0si9djp8blqv3s2imhsdp3(a)4ax.com:

> On Fri, 19 Mar 2010 00:34:28 +0000 (UTC), Rhino
> <no.offline.contact.please(a)example.com> wrote, quoted or indirectly
> quoted someone who said :
>
>>Or have I got something wrong in my computer somewhere? I'm running XP
>>and the system clock says it's 8 PM Eastern time and it is set to
>>recognize Daylight Saving Time. But I may not have installed the
>>update that handles the earlier changeover to Daylight Time. Perhaps
>>that needs to be installed??
>
> try SetClock to be sure your timezone and time are correct.
> see http://mindprod.com/webstart/setclock.html
>

I'm very confused, Roedy.

I clicked on your link and launched your program without any
difficulties. However, I don't understand how it is behaving.

Before I launched SetClock, the clock on my PC (I'm running XP with SP2)
shows a time of 15:26 Eastern time. The time.gov website confirms this
is the correct time for the Eastern time zone.

When I clicked on SetClock, the GUI showed:
Your Time Zone: Eastern Daylight Time (GMT-4:00)
Your PC's Clock: Friday 2010/03/19 04:29:00 PM
Correction: 59 minutes and 59 seconds
Accurate clock: Friday: 201003/19 03:29:56 PM

When I clicked on the SetClock button, the time on my computer changed
to 2:31 and the SetClock GUI now shows 3:31 in both the "Your PC's
Clock" and "Accurate Clock" fields and Correction now says "none".

However, my Java date routines now show the correct hour, 3 P.M.

To paraphrase from Battlestar Galactica, "what the frak??"

How do I get the Java routines to get the right time WHILE STILL HAVING
WINDOWS ITSELF DISPLAY THE CORRECT TIME?


--
Rhino
From: Arne Vajhøj on
On 18-03-2010 23:49, Rhino wrote:
> Arne Vajh�j<arne(a)vajhoej.dk> wrote in
> news:4ba2c897$0$283$14726298(a)news.sunsite.dk:
>> On 18-03-2010 20:34, Rhino wrote:
>>> I'm just retesting some date/time methods I wrote a while back and
>>> noticed something odd. It's 8 PM Eastern time as I write this and the
>>> date routines I have just retested tell me that it's actually 9 PM.
>>> Why would that be?
>>>
>>> I'm guessing it has something to do with Java date routines not
>>> correctly handling the earlier changeover to daylight savings time
>>> that started a few years back. If that's right, how should I be
>>> calculating the hour or the time?
>>>
>>> Or have I got something wrong in my computer somewhere? I'm running
>>> XP and the system clock says it's 8 PM Eastern time and it is set to
>>> recognize Daylight Saving Time. But I may not have installed the
>>> update that handles the earlier changeover to Daylight Time. Perhaps
>>> that needs to be installed??
....
>>> All of these methods are displaying one hour later than it actually
>>> is.
>>
>> What Java version ? Including the update !
>
> I'm running Java 1.6.18, which is pretty recent if I'm not mistaken ;-)

It is latest, so it should have the correct timezone definitions.

Something is confusing Java on your PC.

Arne

From: Arne Vajhøj on
On 19-03-2010 00:02, Rhino wrote:
> Joshua Cranmer<Pidgeot18(a)verizon.invalid> wrote in news:hnuh8d$aro$1(a)news-
> int2.gatech.edu:
>> On 03/18/2010 08:34 PM, Rhino wrote:
>>> I'm just retesting some date/time methods I wrote a while back and
>>> noticed something odd. It's 8 PM Eastern time as I write this and the
>>> date routines I have just retested tell me that it's actually 9 PM. Why
>>> would that be?
>>
>> You probably don't have the up-to-date timezone data files for Java.
>>
>> See<http://java.sun.com/javase/tzupdater_README.html>.
>>
> This is the first I've heard of them. Downloading now....

It is only relevant for old Java versions.

Arne