gmtime

gmtime — transforms Unix time to UTC time and date in ASCII format.

Syntax

gmtime (time_t)

		

Arguments

time_t

The time, usually expressed as the number of seconds from midnight January 1, 1970 on UNIX systems, though it may differ across implementations.

Returns

A instance of the class tm, whose members are as follows:

.sec

The number of seconds after the minute (0 - 59).

.min

The number of minutes after the hour (0 - 59).

.hour

The number of hours past midnight (0 - 23).

.mday

The day of the month (1 - 31).

.mon

The number of months since January (0 - 11)

.year

The number of years since 1900.

.wday

The number of days since Sunday (0 - 6).

.yday

The number of days since January 1 (0 - 365)

.isdst

1 if daylight saving time is in effect, 0 if not, and a negative number ifthe information is not available.

Example

Gamma> pretty_princ ("UTC breakout:\t", gmtime (1149261975.5000002), "\n");
UTC breakout:	{tm (hour . 15) (isdst . 0) (mday . 2) (min . 26)
    (mon . 5) (sec . 15) (wday . 5) (yday . 152) (year . 106)}
t
Gamma>  
		

See Also

gmtime, mktime