
PT-20 Programming Guide
Calender
Get the day of the week information.
The DayOfWeek function returns the day of week information based on
current date.
The DayOfWeek function returns an integer indicating the day of week
information. A value of 1 to 6 represents Monday to Saturday accordingly.
And a value of 7 indicates Sunday.
Get current date and time
int get_time(char *cur_time);
char system_time[16];
get_time(system_time);
The get_time function reads current date and time from the calendar
chip and copies them to a character array specified in the argument
cur_time. The character array cur_time allocated must have a
minimum of 15 bytes to accommodate the date, time, and the string
terminator. The format of the system date and time is listed below.
Normally the get_time function always returns an integer value of 0. If the
calendar chip malfunctions, the get_time function will then return 1 to
indicate error.
Set new date and time to the calendar chip.
Commenti su questo manuale