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/