snobol4time - Man Page

SNOBOL4 time functions


-INCLUDE 'time.sno'



function returns a DATA() object of type TIMEVAL with members TV_SEC (seconds since 1/1/1970 GMT) and TV_NSEC (nanoseconds since start of day starting in CSNOBOL4 2.2). For compatibility with older versions of CSNOBOL,
TV_USEC contains microseconds since start of day).


takes seconds since 1/1/1970, and returns a DATA() object of type TM with the following 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)


converts seconds to a TM object, but without any local time zone adjustments.


converts the TM object representing a date/time in the current timezone setting to seconds since 1/1/1970 UTC.


converts the TM object representing a UTC date/time  to seconds since 1/1/1970 UTC.


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. May return failure if the system indicated the sleep time was less than the requested time.


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.


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)


Philip L. Budne

Referenced By

snobol4(1), snolib(3).

March 31, 2022 CSNOBOL4B 2.3.1 CSNOBOL4 Manual