summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-10-12 07:15:15 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-10-12 07:15:15 -0700
commit4cfe73161d6e00b583c452ef2502862c80d9ce9f (patch)
tree05fd3d17f74334baead11d439b5183e89997122c /txr.1
parent548116bed68b51f86d520eb4ef8825c824a50a5c (diff)
downloadtxr-4cfe73161d6e00b583c452ef2502862c80d9ce9f.tar.gz
txr-4cfe73161d6e00b583c452ef2502862c80d9ce9f.tar.bz2
txr-4cfe73161d6e00b583c452ef2502862c80d9ce9f.zip
Support gmtoff and zone in time struct.
* lib.c (gmtoff_s, zone_s): New symbol variables. (tm_to_time_struct): Copy tm_gmtoff and tm_zone into Lisp struct from struct tm, if the platform has these. (time_fields_to_tm): Zero/null-out the tm_gmtoff and tm_zone fields of the target structure, if the platform has them. (time_init): Intern the gmtoff and zone symbols, initializing the gmtoff_s and zone_s variables. Add the gmtoff and zone slots to the time struct. * txr.1: Documented new slots.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.136
1 files changed, 34 insertions, 2 deletions
diff --git a/txr.1 b/txr.1
index c7f53a6f..095fa482 100644
--- a/txr.1
+++ b/txr.1
@@ -38352,7 +38352,8 @@ function.
.coNP Structure @ time
.synb
(defstruct time nil
- year month day hour min sec dst)
+ year month day hour min sec dst
+ gmtoff zone)
.syne
.desc
The
@@ -38377,7 +38378,7 @@ January, whereas the C member
.code tm_mon
uses a zero-based month. The
.code dst
-slot is a \*(TL Boolean value. The remaining slots
+slot is a \*(TL Boolean value. The slots
.codn hour ,
.codn min ,
and
@@ -38388,6 +38389,37 @@ correspond directly to
and
.codn tm_sec .
+The slot
+.code gmtoff
+represents the number of seconds east of UTC, and
+.code zone
+holds a string giving the abbreviated time zone name.
+On platform where the C type
+.code "struct tm"
+has fields corresponding to these slots, values for
+these slots are calculated and stored into them by the
+.code time-struct-local
+and
+.code time-struct-utc
+functions, and also the related
+.code time-local
+and
+.code time-utc
+methods. On platform where the corresponding fields are not
+present in the C language
+.codn "struct tm" ,
+these slots are unaffected by those functions,
+retaining the default initial value
+.code nil
+or a previously stored value, if applicable.
+Lastly, the values of
+.code gmtoff
+and
+.code zone
+are not ignored by functions which accept a
+.code time
+structure as a source of input values.
+
.coNP Functions @ time-struct-local and @ time-struct-utc
.synb
.mets (time-struct-local << time )