GMTIME - express time value as GMT.

(ANSI Standard)

Usage:

#include <time.h>
tim = gmtime(timeptr);

Where:

const time_t *timeptr;
points to a time number as returned by the "time" function.
struct tm *tim;
is a time structure as described below.

Description:

"gmtime" expands a time number into a structure containing a number of integers giving values for the time expressed in Greenwich Mean Time. The structure includes the following fields:

struct tm {
/* ANSI standard fields */
    int tm_sec;     /* seconds (0-60)    */
    int tm_min;     /* minutes (0-59)    */
    int tm_hour;    /* hours (0-23)      */
    int tm_mday;    /* month day (1-31)  */
    int tm_mon;     /* month (0-11)      */
    int tm_year;    /* year - 1900       */
    int tm_wday;    /* day of week (0-6) */
    int tm_yday;    /* year day (0-365)  */
    int tm_isdst;   /* daylight savings? */
       /* always zero with "gmtime", since
          GMT is never Daylights Saving */
/* extensions to ANSI standard */
    char *tm_zone;  /* time zone name    */
    long tm_gmtoff; /* offset from GMT   */
};

In this way, you can obtain any particular component of the date or time.

Notes:

The C library determines GMT using the time zone definition file of the UW Tools package. For further information, see "expl b tz".

See Also:

expl c lib time

expl c lib asctime

expl c lib localtime

expl b tz

Copyright © 1996, Thinkage Ltd.