Next: , Previous: , Up: Operating-System Interface   [Contents][Index]

15.5 Date and Time

MIT/GNU Scheme provides a simple set of procedures for manipulating date and time information. There are four time representations, each of which serves a different purpose. Each representation may be converted to any of the others.

The primary time representation, universal time, is an exact non-negative integer counting the number of seconds that have elapsed since midnight January 1, 1900 UTC. (UTC stands for Coordinated Universal Time, and is the modern name for Greenwich Mean Time.) This format is produced by get-universal-time and decoded-time->universal-time.

The second representation, decoded time, is a record structure in which the time is broken down into components, such as month, minute, etc. Decoded time is always relative to a particular time zone, which is a component of the structure. This format is produced by global-decoded-time and local-decoded-time.

The third representation, file time, is an exact non-negative integer that is larger for increasing time. Unlike universal time, this representation is operating-system dependent. This format is produced by all of the file-attribute procedures, for example file-modification-time and file-attributes.

The fourth representation, the time string, is an external representation for time. This format is defined by RFC-822, Standard for the format of ARPA Internet text messages, with the modification that years are represented as four-digit numbers rather than two-digit numbers. This format is the standard format for Internet email and numerous other network protocols.

Within this section, argument variables named universal-time, decoded-time, file-time, and time-string are respectively required to be of the corresponding format.

Next: Machine Time, Previous: Directory Reader, Up: Operating-System Interface   [Contents][Index]