Next: , Previous: , Up: Public API   [Contents][Index]


2.2 Timezones

Default: *default-timezone*

The variable *default-timezone* contains the timezone that will be used by default if none is specified. It is loaded from /etc/localtime when the library is loaded. If /etc/localtime is not present, it will default to UTC.

Constant: +utc-zone+

The variable +utc-zone+ contains a timezone corresponding to UTC.

Macro: define-timezone zone-name zone-file &key (load nil)

Define zone-name (a symbol or a string) as a new timezone, lazy-loaded from zone-file (a pathname designator relative to the zoneinfo directory on this system. If load is true, load immediately.

Function: find-timezone-by-location-name name

Returns the timezone found at the location name (such as US/Eastern). reread-timezone-repository must be called before this function is used.

Function: reread-timezone-repository &key (timezone-repository *default-timezone-repository-path*)

Walks the current repository, reading all tzinfo files updating indexes. The default timezone repository is set to the zoneinfo/ directory of the local-time system.