Metrologic Optimus S Programming Manual page 76

"c" programming guide
Table of Contents

Advertisement

70
"C" Programming Guide For Optimus S/R
set_time
This routine reads the current date and time from the calendar chip and copies
Description
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".
None
Return
See Also
DayOfWeek, 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");
Description
This routine sets new date and time (new_time) to the calendar chip.
new_time must have the following format, "YYYYMMDDhhmmss".
YYYY
MM
DD
hh
mm
ss
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
year
4 digits
month
2 digits,
day
2 digits,
hour
2 digits,
minute
2 digits,
second
2 digits,
/* AUGUST 5, 2005 12:58:00 */
01 ~ 12
01 ~ 31
00 ~ 23
00 ~ 59
00 ~ 59

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents