Click to See Complete Forum and Search --> : Java clocks an hour off from computer's clock ?
tcurrier
03-15-2007, 07:55 PM
Hello,
I recently downloaded a couple Java (applet) clocks for use in some of my emails, but since the DST change went into effect, they are all 1 hour off.
I changed my computer's clock to the correct time, but the Java clocks all still have the old time.
Does anyone know what's causing this and/or how I can fix the clocks ?
Thanks for any help !
agent_x91
03-16-2007, 08:11 AM
It's difficult to make any conclusions without seeing the code. Please post it.
tcurrier
03-16-2007, 08:16 AM
I don't have the code, since I just downloaded the class file from the web, so I guess I'm up the creek !
agent_x91
03-16-2007, 08:24 AM
Without the code, you can't modify the code so there's no way you can fix the problem even if you can find out what it's being caused by.
tcurrier
03-16-2007, 08:27 AM
I'm wondering if the Java program is pulling the time from the web somewhere. I'm not trying to modify the code, just curious where it might be getting the time from if it's not getting it from my computer's clock.
agent_x91
03-16-2007, 08:29 AM
Well without seeing the code and thus seeing exactly what it's doing with the time, you can't know for sure.
tcurrier
03-25-2007, 02:32 PM
OK, I found the source code for one of the Java clocks :
(There is a comment that says that it supports DST, but apparently it doesn't... The Java clock's time is an hour behind my computer's time (the correct time)).
The source code is at:
http://www.adcsoft.com/javaclock.html
under the link:
Source code :
JavaClock.java - 17 KB
Thanks....
jasonahoule
03-25-2007, 04:41 PM
It most likely is pulling the time from the JVM. You will need to update your JRE to a newer version that includes the DST patch.
agent_x91
03-26-2007, 05:58 AM
I just realised that the clock is off time by an hour on one of my older programs... :) *Updates JRE on laptop*