Argox PA-20 Programming Guide User Manual

Page 33

Advertising
background image

PT-20 Programming Guide

31

Syntax: int set_time(char *new_time);

Example call:

set_time(“20030401223035”);

Includes:

#include “SDK.h ”

Description:

The set_time function set a new system date and time specified in the

argument new_time to the calendar chip. The character string

new_time must have the following format,

"YYYYMMDDhhmmss"

YYYY

year, 4 digits

MM

month, 2 digits, 1-12

DD

day, 2 digits, 1-31

hh

hour, 2 digits, 0-23

mm

minute, 2 digits, 0-59

ss

second, 2 digits, 0-59

Ps. When it execute in simulator, the time will not change.

Returns: Normally the set_time function always returns an integer value of 1. If the

calendar chip malfunctions, the set_time function will then return 0 to 0

error. Also, if the format is illegal (e.g. set hour to 25), the operation is

simply denied and the time is not changed.

Advertising