summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2013-05-15 20:46:35 -0700
committerKaz Kylheku <kaz@kylheku.com>2013-05-15 20:46:35 -0700
commitb4efd6c6dc386de5ff9ce9f2c3fba251c34a232b (patch)
treef809d027234c315c17cf86ab84027b9bdf52f170 /txr.1
parent10bbad5126477bbf9e46a37d4c323f87f8273dbb (diff)
downloadtxr-b4efd6c6dc386de5ff9ce9f2c3fba251c34a232b.tar.gz
txr-b4efd6c6dc386de5ff9ce9f2c3fba251c34a232b.tar.bz2
txr-b4efd6c6dc386de5ff9ce9f2c3fba251c34a232b.zip
* eval.c (eval_init): New intrinsics, time-string-local and
time-string-utc. * lib.c (string_time): New static function. (time_string_local, time_string_utc): New functions. * lib.h (time_string_local, time_string_utc): Declared. * txr.1: Documented. * RELNOTES: Updated.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.134
1 files changed, 29 insertions, 5 deletions
diff --git a/txr.1 b/txr.1
index fa96fffb..31e408cd 100644
--- a/txr.1
+++ b/txr.1
@@ -10266,12 +10266,36 @@ Syntax:
.TP
Description:
-The time functions return the local time in the system's timezone.
The time function returns the number of seconds that have elapsed since
-midnight, January 1, 1970. The time-usec function returns a cons cell whose
-car field holds the seconds measured in the same way, and whose cdr field
-extends the precision by giving number of microseconds as an integer value
-between 0 and 999999.
+midnight, January 1, 1970, in the UTC timezone.
+
+The time-usec function returns a cons cell whose car field holds the seconds
+measured in the same way, and whose cdr field extends the precision by giving
+number of microseconds as an integer value between 0 and 999999.
+
+.SS Functions time-string-local and time-string-utc
+
+.TP
+Syntax:
+
+ (time-string-local <format> <time>)
+ (time-string-utc <format> <time>)
+
+.TP
+Description:
+
+These functions take the numeric time returned by the time function,
+and convert it to a textual representation in a very flexible way, according to
+a detailed format string.
+
+The time-string-local function converts the time to the local timezone of
+the host system. The time-string-utc function produces time in UTC.
+
+The <format> argument is a string, and follows exactly the same conventions as
+the format string of the C library function strftime.
+
+The <time> argument is an integer representing seconds obtained from the
+time function or from the time-usec function.
.SH WEB PROGRAMMING SUPPORT