diff options
| author | Paul Eggert | 2016-04-12 09:19:11 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-04-12 09:19:38 -0700 |
| commit | fdb1ba144ca61185e6457f092f38f59dd9bbe6a0 (patch) | |
| tree | 5048d1fbb946faf0b6059e4d4375bb514b3bfa74 /doc | |
| parent | 7c2c2196fd4be0b656bdf0e0b68f3d7c4a5eca08 (diff) | |
| download | emacs-fdb1ba144ca61185e6457f092f38f59dd9bbe6a0.tar.gz emacs-fdb1ba144ca61185e6457f092f38f59dd9bbe6a0.zip | |
Support OFFSET and (OFFSET ABBR) time zone rules
This simplifies Gnus and VC time zone support, by letting them
feed the output of ‘current-time-zone’ and ‘decode time’ to
primitives that accept time zone arguments.
* doc/lispref/os.texi (Time Zone Rules, Time Conversion):
* etc/NEWS:
* lisp/gnus/message.el (message-insert-formatted-citation-line):
* lisp/org/org.el (org-timestamp-format):
* src/editfns.c (Fformat_time_string, Fdecode_time):
(Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
Document new behavior.
* lisp/gnus/gmm-utils.el (gmm-format-time-string):
* lisp/vc/add-log.el (add-log-iso8601-time-zone):
Mark as obsolete, as it is now just an alias or narrow wrapper
around format-time-string.
* src/editfns.c (tzlookup): Also support integer OFFSET and
list (OFFSET ABBR) as time zone rules.
(Fencode_time): No longer need a special case for a cons ZONE.
(Fcurrent_time_zone): If the time zone string is missing, compute
it the same way the other new code does.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/os.texi | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 6e0edec2943..becb691581b 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -1325,7 +1325,12 @@ omitted or @code{nil}, the conversion uses Emacs's default time zone. | |||
| 1325 | If it is @code{t}, the conversion uses Universal Time. If it is | 1325 | If it is @code{t}, the conversion uses Universal Time. If it is |
| 1326 | @code{wall}, the conversion uses the system wall clock time. If it is | 1326 | @code{wall}, the conversion uses the system wall clock time. If it is |
| 1327 | a string, the conversion uses the time zone rule equivalent to setting | 1327 | a string, the conversion uses the time zone rule equivalent to setting |
| 1328 | @env{TZ} to that string. | 1328 | @env{TZ} to that string. If it is an integer @var{offset}, the |
| 1329 | conversion uses a fixed time zone with the given offset and a numeric | ||
| 1330 | abbreviation. If it is a list (@var{offset} @var{abbr}), where | ||
| 1331 | @var{offset} is an integer number of seconds east of Universal Time | ||
| 1332 | and @var{abbr} is a string, the conversion uses a fixed time zone with | ||
| 1333 | the given offset and abbreviation. | ||
| 1329 | 1334 | ||
| 1330 | @defun current-time-zone &optional time zone | 1335 | @defun current-time-zone &optional time zone |
| 1331 | @cindex time zone, current | 1336 | @cindex time zone, current |
| @@ -1423,10 +1428,6 @@ yourself before you call @code{encode-time}. | |||
| 1423 | 1428 | ||
| 1424 | The optional argument @var{zone} defaults to the current time zone rule. | 1429 | The optional argument @var{zone} defaults to the current time zone rule. |
| 1425 | @xref{Time Zone Rules}. | 1430 | @xref{Time Zone Rules}. |
| 1426 | In addition to the usual time zone rule values, it can also be a list | ||
| 1427 | (as you would get from @code{current-time-zone}) or an integer (as | ||
| 1428 | from @code{decode-time}), applied without any further alteration for | ||
| 1429 | daylight saving time. | ||
| 1430 | 1431 | ||
| 1431 | If you pass more than seven arguments to @code{encode-time}, the first | 1432 | If you pass more than seven arguments to @code{encode-time}, the first |
| 1432 | six are used as @var{seconds} through @var{year}, the last argument is | 1433 | six are used as @var{seconds} through @var{year}, the last argument is |