gmtime()

NAME

gmtime() - transform binary date and time value to ASCII UTC form

SYNOPSIS

#include <time.h>

struct tm * gmtime (const time_t *clock)

DESCRIPTION

The function gmtime(3) takes as an argument a time value representing the time in seconds since the Epoch (00:00:00 UTC, January 1, 1970; see time(2)). It converts the time value pointed at by clock, and returns a pointer to a struct tm (described below) which contains the broken-out time information for the value without adjusting for time zones or other factors such as Daylight Saving Time). It then returns a pointer to a tm structure (described below).

Thu Nov 24 18:22:48 1986\n\0

All the fields have constant width.

External declarations as well as the tm structure definition are in the <time.h> include file. The tm structure includes at least the following fields:

int tm_sec; seconds (0 - 60)
int tm_min; minutes (0 - 59)
int tm_hour; hours (0 - 23)
int tm_mday; day of month (1 - 31)
int tm_mon; month of year (0 - 11)
int tm_year; year - 1900
int tm_wday; day of week (Sunday = 0)
int tm_yday; day of year (0 - 365)
int tm_isdst; is summer time in effect?

The field tm_isdst is non-zero if Daylight Saving Time is in effect.

SEE ALSO

date(1)

asctime(3)

ctime(3)

localtime(3)

getenv(3)

time(2)

tzset(3)