(chibi time)

(time expr)
(time name expr)

Accessors for the tm struct.

(timeval? obj)
(make-timeval tv_sec tv_usec)
(timeval-seconds timeval)
(timeval-microseconds timeval)

Accessors for the timeval struct.

(timezone? obj)
(timezone-offset timezone)
(timezone-dst-time timezone)

Accessors for the timezone struct.

(current-seconds)

Returns the current time as an integer number of seconds since an arbitrary epoch.

(get-time-of-day)

Returns the current time as a list of a timeval struct and a timezone.Set the current time from a timeval struct and and optional timezone.

(seconds->time time_t)

Convert an integer number of epoch seconds to a broken-down tm struct.

(time->seconds tm)

Convert a tm struct to an integer number of seconds.

(seconds->string time_t)

Format a datetime string from an integer number of epoch seconds.

(time->string tm)

Format a datetime string from a tm struct.