Next: , Previous: , Up: The (www *) Modules   [Contents][Index]


5 (www utcsec)

The (www utcsec) module provides procedures to work with the utc-seconds of an object, that is, the number of seconds after epoch, in the GMT time zone (also known as UTC).

Procedure: format-utcsec port format utc-seconds

Write to output port port the utc-seconds formatted according to format (a string). If port is #f, return the output string, instead. This uses strftime, q.v.

Procedure: rfc1123-date<- port utc-seconds

Write to output port port the utc-seconds formatted according to RFC1123. If port is #f, return the output string, instead.

For example:

(rfc1123-date<- #f 1167791441)
⇒ "Wed, 03 Jan 2007 02:30:41 GMT"
Procedure: <-rfc1123-date s

Parse the RFC1123-compliant date string s, and return the utc-seconds it represents.

For example:

(<-rfc1123-date "Wed, 03 Jan 2007 02:30:41 GMT")
⇒ 1167791441
Procedure: <-mtime filespec

Return the utc-seconds of the modification time of filespec. filespec can be a filename (string), a port opened on a statable file, or the object resulting from a stat on one of these.

For example:

(= (<-mtime "COPYING")
   (<-mtime (open-input-file "COPYING"))
   (<-mtime (stat "COPYING")))
⇒ #t
Procedure: <-ctime filespec

Return the utc-seconds of the creation time of filespec. filespec can be a filename (string), a port opened on a statable file, or the object resulting from a stat on one of these.

Procedure: rfc1123-now

The "current time" formatted according to RFC1123.


Next: (www server-utils big-dishing-loop), Previous: (www url-coding), Up: The (www *) Modules   [Contents][Index]