COHERENT manpages

This page displays the COHERENT manpage for gmtime() [Convert system time to calendar structure].

List of available manpages
Index


gmtime() -- Time Function (libc)

Convert system time to calendar structure
#include <time.h>
#include <sys/types.h>
tm *gmtime(timep)
time_t *timep;

gmtime() converts the internal  time from seconds since midnight January 1,
1970 GMT, into fields that give integer years since 1900, the month, day of
the  month, the  hour, the  minute, the  second, the day  of the  week, and
yearday.  It  returns a  pointer to the  structure tm, which  defines these
fields, and which  is itself defined in the header  file time.h. Unlike its
cousin, localtime(), gmtime() returns Greenwich Mean Time (GMT).

Example

For an example of how to use this function, see asctime().

See Also

GMT,
libc,
localtime(),
time [overview],
TIMEZONE
ANSI Standard, §7.12.3.3
POSIX Standard, §8.1

Notes

gmtime()  returns a  pointer to  a statically allocated  data area  that is
overwritten by successive calls.