Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-85
gmtime
gmtime
The gmtime function converts the calendar time pointed to by timer to a broken-down
time, and stores the broken-down time in a structure of type struct tm that is provided for
you. The gmtime function returns the address of the structure.
timer
points to the calendar time.
Return Value
points to the structure of type struct tm that contains the Coordinated Universal Time
(UTC).
Usage Guidelines
•
The structure type struct tm is defined in the header timeh and has the following
members:
struct tm{
int tm_sec; /* seconds after the minute: [0, 61]*/
int tm_min; /* minutes after the hour: [0, 59] */
int tm_hour; /* hours since midnight: [0, 23] */
int tm_mday; /* day of the month: [1, 31] */
int tm_mon; /* months since January: [0, 11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday; [0, 6] */
int tm_yday; /* days since January 1: [0, 365] */
int tm_isdst; /* Daylight Savings Time flag */
};
Note that the flag tm_isdst is positive if Daylight Savings Time is in effect, zero if it
is not, and negative if the information is not available.
•
Coordinated Universal Time (UTC) is a synonym for Greenwich Mean Time
(GMT).
#include <timeh>
struct tm *gmtime(const time_t *timer);