Skip to content

Time

Represents time of day.

;; Get current time in local timezone
(time 'local)
10:30:00.000

;; Get current time in UTC
(time 'utc)
14:30:00.000
;; Create time from literal
 (as 'time 10:30:00)
10:30:00.000

;; Time arithmetic (in milliseconds)
 (+ 10:30:00 3600000)
11:30:00.000

;; Compare times
 (< 10:30:00 11:30:00)
true

Format

  • Times are stored as milliseconds since midnight
  • Display format is HH:MM:SS
  • Internally represented as 32-bit integers

Warning

  • Valid range is 00:00:00 to 23:59:59.999
  • Invalid times return null
  • Time arithmetic works in milliseconds