localtime

localtime — transforms Unix time to local time and date in ASCII format.

Syntax

localtime (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

An 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 ("Local breakout:\t", localtime (1149261975.5000002), "\n");
Local breakout:	{tm (hour . 11) (isdst . 1) (mday . 2) (min . 26)
    (mon . 5) (sec . 15) (wday . 5) (yday . 152) (year . 106)}
t
Gamma>  
		

See Also

gmtime, mktime