Next: , Previous: Posix Time, Up: Time and Date


4.13.3 Common-Lisp Time

— Function: get-decoded-time

Equivalent to (decode-universal-time (get-universal-time)).

— Function: get-universal-time

Returns the current time as Universal Time, number of seconds since 00:00:00 Jan 1, 1900 GMT. Note that the reference time is different from current-time.

— Function: decode-universal-time univtime

Converts univtime to Decoded Time format. Nine values are returned:

  1. seconds (0 - 61)
  2. minutes (0 - 59)
  3. hours since midnight
  4. day of month
  5. month (1 - 12). Note difference from gmtime and localtime.
  6. year (A.D.). Note difference from gmtime and localtime.
  7. day of week (0 - 6)
  8. #t for daylight savings, #f otherwise
  9. hours west of GMT (-24 - +24)

Notice that the values returned by decode-universal-time do not match the arguments to encode-universal-time.

— Function: encode-universal-time second minute hour date month year
— Function: encode-universal-time second minute hour date month year time-zone

Converts the arguments in Decoded Time format to Universal Time format. If time-zone is not specified, the returned time is adjusted for daylight saving time. Otherwise, no adjustment is performed.

Notice that the values returned by decode-universal-time do not match the arguments to encode-universal-time.