Skip to main content

set time for System.CurrentTimeMillis()

1 reply [Last post]
Joined: 2009-01-16

I am using a Cinterion Modem to pass data from field sensors through the modem unit and back to a central server. As part of this I need to timestamp the data as it passes trough the modem. Every time the modem (TC65i) is swtched on it reverts to 01-01-2002, and my system time miilis then tick from that date. I currently get the time from a time server, set and use AT+CCLK to time stamp every data transfer, but this seems a bit backwards to me, when all I think I need is system millis and a calendar function.

Is is possible to set a system time, or is there a workaround?

Many thianks in advance for any advice.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-06-18

As far as I know there is no way to set the System.currentTimeMillis() from Java.