Home AMX User Forum Duet/Cafe Duet

Java Time Issues

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.


  • Options
    GregGGregG Posts: 251
    I ran into a problem a while back where the internal hardware clock in netlinx is set to local time (like windows does), but the library functions in java expect the hardware clock to be set as utc.


    Maybe they haven't found a work-around for it yet?
  • Options
    AMXJeffAMXJeff Posts: 450
    GregG wrote: »
    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...
Sign In or Register to comment.