Getting the current system time into a DateTimeType:

DateTimeType dateTime;
TimSecondsToDateTime( TimGetSeconds(), &dateTime );

The TimGetSeconds() function returns the current number of seconds
elapsed since Jan 1 1904 and the TimSecondsToDateTime() function
converts seconds elapsed since the aforementioned date into the
DateTimeType struct.

It's all documented in the, well, documentation.  :)
Available at http://www.palmos.com/dev in the SDK download
section.


-----Original Message-----
From: K.Sridhar Babu [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 7:58 AM
To: Palm Developer Forum
Subject: how to find system time



Dear Friends,

I am relatively new to the palm programming.

How to find current system's date and time (Getting the time in
DateTimeType)?
I found some method
"void TimAdjust (DateTimePtr dateTimeP,Int32 adjustment)",
here by giving 0 as the adjustment we can get the system's time in the
dataTimeP parameter.

Is this the only solution for this problem?
Is this a good way of doing?
Is there any other way to find system's time?

Thanks in advance.
Sridhar


-- 
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