70
"C" Programming Guide For Optimus S/R
Description
This routine reads the current date and time from the calendar chip and copies
them to a character array (
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 "YYYYMMDDhhmmss".
Return
None
See Also
DayOfWeek, set_time
set_time
Purpose
To set new date and time to the calendar chip.
Syntax
int set_time (char *new_time);
char *new_time;
Example
set_time ("20050805125800"); /* AUGUST 5, 2005 12:58:00 */
Description
This routine sets new date and time (
new_time
) to the calendar chip.
new_time
must have the following format, "YYYYMMDDhhmmss".
YYYY
year
4 digits
MM
month
2 digits,
01 ~ 12
DD
day
2 digits,
01 ~ 31
hh
hour
2 digits,
00 ~ 23
mm
minute
2 digits,
00 ~ 59
ss
second
2 digits,
00 ~ 59
If the format is invalid (e.g. set hour to 25), the operation is simply denied and
the time remains unchanged.
Return
If successful, it returns 1.
Otherwise, it returns 0. (i.e. malfunctioning of calendar chip or wrong format)
See Also
DayOfWeek, get_time
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...