gmtime---convert time to UTC traditional form
#include <time.h> struct tm *gmtime(const time_t *clock); struct tm *gmtime_r(const time_t *clock, struct tm *res);
gmtime assumes the time at clock represents a local time.
gmtime converts it to UTC (Universal Coordinated Time, also known in some
countries as GMT, Greenwich Mean time), then converts the
representation from the arithmetic representation to
the traditional representation defined by
gmtime constructs the traditional time representation in static
storage; each call to
localtime will overwrite the
information generated by previous calls to either function.
A pointer to the traditional time representation (
ANSI C requires
gmtime requires no supporting OS subroutines.
Go to the first, previous, next, last section, table of contents.