Return the number of seconds since 1970-01-01 00:00:00 UTC, excluding leap seconds.
Return a pair containing the number of seconds and microseconds since 1970-01-01 00:00:00 UTC, excluding leap seconds. Note: whether true microsecond resolution is available depends on the operating system.
The following procedures either accept an object representing a broken down time and return a selected component, or accept an object representing a broken down time and a value and set the component to the value. The numbers in parentheses give the usual range.
Year (70-), the year minus 1900.
Day of the week (0-6) with Sunday represented as 0.
Day of the year (0-364, 365 in leap years).
Daylight saving indicator (0 for “no”, greater than 0 for “yes”, less than 0 for “unknown”).
Time zone offset in seconds west of UTC (-46800 to 43200). For example on East coast USA (zone ‘EST+5’) this would be 18000 (ie. 5*60*60) in winter, or 14400 (ie. 4*60*60) during daylight savings.
tm:gmtoffis not the same as
tm_gmtoffin the C
tm_gmtoffis seconds east and hence the negative of the value here.
Time zone label (a string), not necessarily unique.
Return an object representing the broken down components of time, an integer like the one returned by
current-time. The values are calculated for UTC.
For a broken down time object sbd-time, return a pair the
carof which is an integer time like
current-time, and the
cdrof which is a new broken down time with normalized fields.
zone is a timezone string, or the default is the TZ environment variable or the system default (see Specifying the Time Zone with TZ). sbd-time is taken to be in that zone.
The following fields of sbd-time are used:
tm:isdst. The values can be outside their usual ranges. For example
tm:hournormally goes up to 23, but a value say 33 would mean 9 the following day.
tm:isdstin sbd-time says whether the time given is with daylight savings or not. This is ignored if zone doesn't have any daylight savings adjustment amount.
The broken down time in the return normalizes the values of sbd-time by bringing them into their usual ranges, and using the actual daylight savings rule for that time in zone (which may differ from what sbd-time had). The easiest way to think of this is that sbd-time plus zone converts to the integer UTC time, then a
localtimeis applied to get the normal presentation of that time, in zone.
Initialize the timezone from the TZ environment variable or the system default. It's not usually necessary to call this procedure since it's done automatically by other procedures that depend on the timezone.
format contains field specifications introduced by a ‘%’ character. See Formatting Calendar Time, or ‘man 3 strftime’, for the available formatting.(strftime "%c" (localtime (current-time))) ⇒ "Mon Mar 11 20:17:43 2002"
setlocalehas been called (see Locales), month and day names are from the current locale and in the locale character set.
Note that ‘%Z’ might print the
tm:zonein tm or it might print just the current zone (
tzsetabove). A GNU system prints
tm:zone, a strict C99 system like NetBSD prints the current zone. Perhaps in the future Guile will try to get
Performs the reverse action to
strftime, parsing string according to the specification supplied in template. The interpretation of month and day names is dependent on the current locale. The value returned is a pair. The CAR has an object with time components in the form returned by
gmtime, but the time zone components are not usefully set. The CDR reports the number of characters from string which were used for the conversion.
The value of this variable is the number of time units per second reported by the following procedures.
Return an object with information about real and processor time. The following procedures accept such an object as an argument and return a selected component:— Scheme Procedure: tms:clock tms
The current real time, expressed as time units relative to an arbitrary base.— Scheme Procedure: tms:stime tms
The CPU time units used by the system on behalf of the calling process.— Scheme Procedure: tms:cutime tms
The CPU time units used by terminated child processes of the calling process, whose status has been collected (e.g., using
Return the number of time units since the interpreter was started.