drneau.com Forum Index drneau.com
A discussion board for drneau.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

BUG? : Time of day incorrect

 
Post new topic   Reply to topic    drneau.com Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
cybershoe
"Ace High"


Joined: 06 Jun 2009
Posts: 4
Location: Directly above the centre of the earth.

PostPosted: Sat Oct 03, 2009 6:21 pm    Post subject: BUG? : Time of day incorrect Reply with quote

Not sure if this is actually a bug or a problem with my system... but anyways:

The time of day is incorrect in Tournament Manager. Currently, my system clock shows 20:17, while Tournament Manager shows 20:12. That is almost UTC, but not quite.

The interesting thing is that this started roughly the same time as I upgraded to Snow Leopard.

Given the timing of the upgrade, I'm suspicious it's my system and not the app, but I'd appreciate some help in troubleshooting.

Thanks,

- Adam
_________________
--
- Adam
Back to top
View user's profile Send private message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Sun Oct 04, 2009 9:41 am    Post subject: Reply with quote

Well, the app just gets the time of day from the Java Virtual Machine, which in turn gets it from the system.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cybershoe
"Ace High"


Joined: 06 Jun 2009
Posts: 4
Location: Directly above the centre of the earth.

PostPosted: Tue Oct 06, 2009 6:27 pm    Post subject: Reply with quote

Right, which is pretty much what I figured... so somewhere in that process something isn't getting communicated properly. The system time is correct, at least in the UI and using the date command.

Seeing as you know java and I don't, do you know if there is an easy way to find out what the JRE thinks the current time is? I'm trying to figure out if the problem is between osx and java, or between java and DrNTM.

Also, does java handle converting UTC to local time itself, or is that part of the app? I ask because my time zone is UTC -5 hours, but it looks like the app is showing UTC -5 minutes.
_________________
--
- Adam
Back to top
View user's profile Send private message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Tue Oct 06, 2009 9:15 pm    Post subject: Reply with quote

cybershoe wrote:
Right, which is pretty much what I figured... so somewhere in that process something isn't getting communicated properly. The system time is correct, at least in the UI and using the date command.

Seeing as you know java and I don't, do you know if there is an easy way to find out what the JRE thinks the current time is? I'm trying to figure out if the problem is between osx and java, or between java and DrNTM.

Also, does java handle converting UTC to local time itself, or is that part of the app? I ask because my time zone is UTC -5 hours, but it looks like the app is showing UTC -5 minutes.


Well, I can guarantee that what you see on the console is the time that the JRE thinks it is.

I just have a thread that runs every second, grabs the current system time and throws it into a variable. The rendering on the console uses a DateFormat object that defaults to the locale that your system is using.

You could also check the tournament log as you do anything that causes an event to be logged. Are you seeing the correct time show up there?
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cybershoe
"Ace High"


Joined: 06 Jun 2009
Posts: 4
Location: Directly above the centre of the earth.

PostPosted: Sun Dec 20, 2009 7:38 pm    Post subject: Reply with quote

Recent Mac OS JRE update fixed the problem.
_________________
--
- Adam
Back to top
View user's profile Send private message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Tue Dec 22, 2009 9:23 pm    Post subject: Reply with quote

cybershoe wrote:
Recent Mac OS JRE update fixed the problem.


Thanks for the update (pun intended)
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
exterminatorx
"Ace High"


Joined: 20 May 2009
Posts: 15

PostPosted: Fri Mar 26, 2010 3:33 pm    Post subject: Reply with quote

drneau wrote:
Well, the app just gets the time of day from the Java Virtual Machine, which in turn gets it from the system.


Since daylight savings time, my instance of DrTM (v3.1.0.2) has been displaying and recording tournament times one hour behind my OS (Ubuntu v9.02) system clock. My OS system packages are up to date. Why would the JVM time functions be off? Are you accounting for daylight time?
Back to top
View user's profile Send private message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Sat Mar 27, 2010 1:16 pm    Post subject: Reply with quote

exterminatorx wrote:
drneau wrote:
Well, the app just gets the time of day from the Java Virtual Machine, which in turn gets it from the system.


Since daylight savings time, my instance of DrTM (v3.1.0.2) has been displaying and recording tournament times one hour behind my OS (Ubuntu v9.02) system clock. My OS system packages are up to date. Why would the JVM time functions be off? Are you accounting for daylight time?


I don't need to account for daylight savings. The Java Virtual Machine (JVM) does that.

My guess is that your JVM doesn't correctly adjust for the recent change in when daylight savings starts and ends. JVMs needed to be updated to account for it.

http://www.edgeblog.net/2007/daylight-saving-time-the-year-2007-problem/

My guess is that your time magically displays correctly in about a week...or as soon as you get a more recent JVM.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
exterminatorx
"Ace High"


Joined: 20 May 2009
Posts: 15

PostPosted: Sat Mar 27, 2010 6:08 pm    Post subject: Reply with quote

drneau wrote:

My guess is that your JVM doesn't correctly adjust for the recent change in when daylight savings starts and ends. JVMs needed to be updated to account for it.


Yup. Current version of Sun JVM on Ubuntu v9.10 is Java 1.6.0_15-b03. According to Sun they have fixed in Java 1.6.0_18-b02, but that the Ubuntu package distros hasn't released that yet.

ref: https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/49068/comments/39

but here's a workaround for me that works:

https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/49068/comments/13
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    drneau.com Forum Index -> General Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group