Well, I don't know if J2ME does it, or if they have their own
API call for it, but if there's any way to get at the system
preferences, I'd advise hunting through the documentation or
headers (as much as you can).  Many apps check the system time,
too...you might find some source that does it.  

Sorry I couldn't be of more help!
-Rus

>how can we get the system time using java i mean J2ME
>
>-----Original Message-----
>From: Nesse, Rustin [mailto:[EMAIL PROTECTED]]
>Sent: Friday, September 15, 2000 12:54 PM
>To: Palm Developer Forum
>Subject: RE: Get Current Time
>
>
>This is kind of what I use...note:  it's dependant on your system
>preferences.  If you have your preferences date wrong, then this 
>will return that wrong date/time.  Tinker around with the formats,
>check out the Reference for details on how to do so, under TimeMgr.
>
>static void GetCurrentDateTime() 
>{      
>       DateTimeType ct;
>       
>       static char date[32];  // Arrays for date and time
>       static char time[32];
>       SystemPreferencesType sysPrefs;
>       PrefGetPreferences( &sysPrefs ); // Get system preferences      
>       TimSecondsToDateTime( TimGetSeconds(),&ct); // Get time/date
>structure
>       // Get date formatted 
>       DateToAscii(ct.month,ct.day,ct.year, dfYMDLongWithDot, date);
>       TimeToAscii( ct.hour, ct.minute, tfColonAMPM, time );
>}
>
>-Rus
>
>>
>>What's the function call that gets the current time?
>>
>>
>>
>>-- 
>>For information on using the Palm Developer Forums, or to 
>>unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>>
>
>-- 
>For information on using the Palm Developer Forums, or to unsubscribe,
>please see http://www.palmos.com/dev/tech/support/forums/
>
>-- 
>For information on using the Palm Developer Forums, or to 
>unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to