SNOBOL4TIME

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
AUTHOR

NAME

snobol4time − SNOBOL4 time functions

SYNOPSIS

-INCLUDE ’time.sno’

DESCRIPTION

The GETTIMEOFDAY() function returns a DATA() object of type TIMEVAL with members TV_SEC (seconds since 1/1/1970 GMT) and TV_USEC (microseconds since start of day).

LOCALTIME(sec) takes seconds since 1/1/1970, and returns a DATA() object of type TM with members:

TM_SEC

seconds since start of local minute (0 to 60)

TM_MIN

minutes since start of local hour (0 to 59)

TM_HOUR

hours since start of local day (0 to 23)

TM_MDAY

day of month (1 to 31)

TM_MON

month of year (0 to 11)

TM_YEAR

year minus 1900

TM_WDAY

day of week (sunday = 0)

TM_YDAY

day of year (0 to 365)

TM_ISDST

is non-zero if summer time in effect at that time

TM_GMTOFF

offset from UTC in seconds (or -1 if not available)

GMTIME(sec) converts seconds to a TM object, but without any local time zone adjustments.

MKTIME(tm) converts a TM object to seconds since 1/1/1970.

SLEEP(fp_sec) suspends program execution for a number of (floating point) seconds. Not all platforms may support sleep, or sleep for fractional seconds. Sleep resolution may vary between platforms. Returns failure if the system indicated the sleep time was less than the requested time.

STRFTIME(format,tm) formats the date information in tm according to the format string. Consult your local strftime(3) manual page (or C runtime manual) for more details.

STRPTIME(str,format) parses a string using using the supplied format and returns a TM object with the parsed elements filled in. Consult your local strptime(3) manual page (or C runtime manual) for more details.

SEE ALSO

snobol4(1), ctime(3), strftime(3), strptime(3)

AUTHOR

Philip L. Budne