Java Time Issues
JasonS
Posts: 229
Anybody ever deal with UTC time in Duet? It is my understanding that my PC and AMX master both synced to network time should have very similar values for "Date.getTime()" and "System.currentTimeMillis()", as both should be a count of the number of milliseconds elapsed since Jan 1 1970. Displayable time would then be calculated via a TimeZone offset. My Date.getTime() value differs by 5 hours or more, currentTimeMillis by about 3 hours. (Both depend on wether you use integer math or not). Anybody know what is going on? I am trying to generate time stamps on a PC (in Java) and use them in Duet, not sure about using an arbitrary offset because not sure what timezones this might be used in.
0
Comments
http://www.amxforums.com/showthread.php?5176-Something-up-with-the-Date()-functions-in-Duet
Maybe they haven't found a work-around for it yet?
They have not fixed it yet, reported it again recently. The fix is easy, you just set the time zone to UTC in the JVM startup system properties. But first they have to agree its a bug, than they have to want to fix it. Oh well...