OK doing more searching, I think my code here should work. The date seems to
change bug not the time. Can anyone see something wrong with this?
thanks
Ralph Krausse
*****************************************************************
DateTimeType thisDay;
ULong ulCurrentTimeAndDate = TimGetSeconds();
TimSecondsToDateTime(ulCurrentTimeAndDate, &thisDay);
if (SelectOneTime(&thisDay.hour,&thisDay.minute,"Set Time"))
{
if(SelectDay(selectDayByDay,&thisDay.month,&thisDay.day,&thisDay.year,"Pleas
e select a date"))
{
thisDay.second = 0; // set seconds to zero when
setting time
ULong ulTimeAndDateToSet =
TimDateTimeToSeconds(&thisDay);
TimSetSeconds(ulTimeAndDateToSet);
}
}
ULong ulNewTimeAndDate = TimGetSeconds ();
TimSecondsToDateTime (ulNewTimeAndDate, dateTime);
TimeToAscii (dateTime->hour, dateTime->minute, *TimeFormat, szTime);
DateToAscii (dateTime->month, dateTime->day, dateTime->year,
*DateFormat, szDate);
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/