Next: NCBI-DNA, Previous: Printing Scheme, Up: Textual Conversion Packages [Contents][Index]
If (provided? 'current-time)
:
The procedures current-time
, difftime
, and
offset-time
deal with a calendar time datatype
which may or may not be disjoint from other Scheme datatypes.
Returns the time since 00:00:00 GMT, January 1, 1970, measured in
seconds. Note that the reference time is different from the reference
time for get-universal-time
in Common-Lisp Time.
Returns the difference (number of seconds) between twe calendar times: caltime1 - caltime0. caltime0 may also be a number.
Returns the calendar time of caltime offset by offset number
of seconds (+ caltime offset)
.
Next: Posix Time, Previous: Time and Date, Up: Time and Date [Contents][Index]
(require ’time-zone)
POSIX standards specify several formats for encoding time-zone rules.
If the first character of <pathname> is ‘/’, then <pathname> specifies the absolute pathname of a tzfile(5) format time-zone file. Otherwise, <pathname> is interpreted as a pathname within tzfile:vicinity (/usr/lib/zoneinfo/) naming a tzfile(5) format time-zone file.
The string <std> consists of 3 or more alphabetic characters.
<offset> specifies the time difference from GMT. The <offset>
is positive if the local time zone is west of the Prime Meridian and
negative if it is east. <offset> can be the number of hours or
hours and minutes (and optionally seconds) separated by ‘:’. For
example, -4:30
.
<dst> is the at least 3 alphabetic characters naming the local daylight-savings-time.
<doffset> specifies the offset from the Prime Meridian when daylight-savings-time is in effect.
The non-tzfile formats can optionally be followed by transition times specifying the day and time when a zone changes from standard to daylight-savings and back again.
The <time>s are specified like the <offset>s above, except that leading ‘+’ and ‘-’ are not allowed.
Each <date> has one of the formats:
specifies the Julian day with <day> between 1 and 365. February 29 is never counted and cannot be referenced.
This specifies the Julian day with n between 0 and 365. February 29 is counted in leap years and can be specified.
This specifies day <day> (0 <= <day> <= 6) of week <week> (1 <= <week> <= 5) of month <month> (1 <= <month> <= 12). Week 1 is the first week in which day d occurs and week 5 is the last week in which day <day> occurs. Day 0 is a Sunday.
is a datatype encoding how many hours from Greenwich Mean Time the local time is, and the Daylight Savings Time rules for changing it.
Creates and returns a time-zone object specified by the string
TZ-string. If time-zone
cannot interpret TZ-string,
#f
is returned.
tz is a time-zone object. tz:params
returns a list of
three items:
tz:params
is unaffected by the default timezone; inquiries can be
made of any timezone at any calendar time.
tz is a time-zone object. tz:std-offset
returns the
number of seconds west of the Prime Meridian timezone tz is.
The rest of these procedures and variables are provided for POSIX compatability. Because of shared state they are not thread-safe.
Returns the default time-zone.
Sets (and returns) the default time-zone to tz.
Sets (and returns) the default time-zone to that specified by TZ-string.
tzset
also sets the variables *timezone*, daylight?,
and tzname. This function is automatically called by the time
conversion procedures which depend on the time zone
(see Time and Date).
Contains the difference, in seconds, between Greenwich Mean Time and
local standard time (for example, in the U.S. Eastern time zone (EST),
timezone is 5*60*60). *timezone*
is initialized by tzset
.
is #t
if the default timezone has rules for Daylight Savings
Time. Note: daylight? does not tell you when Daylight
Savings Time is in effect, just that the default zone sometimes has
Daylight Savings Time.
is a vector of strings. Index 0 has the abbreviation for the standard timezone; If daylight?, then index 1 has the abbreviation for the Daylight Savings timezone.
Next: Common-Lisp Time, Previous: Time Zone, Up: Time and Date [Contents][Index]
(require 'posix-time)
is a datatype encapsulating time.
(abbreviated UTC) is a vector of integers representing time:
decode-universal-time
.
decode-universal-time
.
Converts the calendar time caltime to UTC and returns it.
Returns caltime converted to UTC relative to timezone tz.
converts the calendar time caltime to a vector of integers
expressed relative to the user’s time zone. localtime
sets the
variable *timezone* with the difference between Coordinated
Universal Time (UTC) and local standard time in seconds
(see tzset).
Converts a vector of integers in GMT Coordinated Universal Time (UTC) format to a calendar time.
Converts a vector of integers in local Coordinated Universal Time (UTC) format to a calendar time.
Converts a vector of integers in Coordinated Universal Time (UTC) format (relative to time-zone tz) to calendar time.
Converts the vector of integers caltime in Coordinated
Universal Time (UTC) format into a string of the form
"Wed Jun 30 21:49:08 1993"
.
Equivalent to (asctime (gmtime caltime))
,
(asctime (localtime caltime))
, and
(asctime (localtime caltime tz))
, respectively.
Next: ISO 8601, Previous: Posix Time, Up: Time and Date [Contents][Index]
(require 'common-lisp-time)
Equivalent to (decode-universal-time (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
.
Converts univtime to Decoded Time format. Nine values are returned:
gmtime
and localtime
.
gmtime
and localtime
.
Notice that the values returned by decode-universal-time
do not
match the arguments to encode-universal-time
.
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
.
Next: Time Infrastructure, Previous: Common-Lisp Time, Up: Time and Date [Contents][Index]
(require 'iso-8601)
time is the time in seconds since 00:00:00 GMT, January 1, 1970.
time->iso-8601
returns an expanded ISO 8601 format string for the date and time.
time is a time in seconds since 00:00:00 GMT, January 1, 1970.
time->iso8601
returns a compact ISO 8601 format string for the date and time.
str is a string in ISO 8601 format, either compact or expanded.
iso-8601->time
returns that time in seconds since 00:00:00 GMT, January 1, 1970.
Next: NCBI-DNA, Previous: Printing Scheme, Up: Textual Conversion Packages [Contents][Index]