<< Previous | Next >> | |
|
int rtc_timezone( long * seconds, char * tzname );
Description
- This function returns the timezone offset as known by the library. The timezone is obtained from the following sources, in order of preference:
Parameters
- seconds
- Pointer to result longword. This will be set to the number of seconds offset from Coordinated Universal Time (UTC). The value will be negative for west; positive for east of Greenwich.
- tzname
- If null, no timezone name is returned. Otherwise, this must point to a buffer of at least 7 bytes. The buffer is set to a null-terminated string of between 0 and 6 characters in length, according to the value of the
TZNAME
macro. IfTZNAME
is not defined, then the returned string is zero length ("").
Return value
0
: timezone obtained from DHCP.
-1
: timezone obtained fromTIMEZONE
macro. The value of this macro (which may beint
,float
or a variable name) is multiplied by 3600 to form the return value.
-2
: timezone is zero since theTIMEZONE
macro was not defined.Library
- RTCLOCK.LIB
Dynamic C Functions | << Previous | Next >> | rabbit.com |