diff options
| author | Paul Eggert | 2020-01-24 13:36:56 -0800 |
|---|---|---|
| committer | Paul Eggert | 2020-01-24 13:41:56 -0800 |
| commit | a391ffa2f0377306449b36cc62858db823d2e990 (patch) | |
| tree | 6b4c1723452ea8ec3ce456278f964626df209275 /doc | |
| parent | 9c576c207a8f4f98fd89deb4f3b4bfbe1ad37e37 (diff) | |
| download | emacs-a391ffa2f0377306449b36cc62858db823d2e990.tar.gz emacs-a391ffa2f0377306449b36cc62858db823d2e990.zip | |
Fix iso8601-parse so unknown DST is -1, not nil
The convention in a decoded time’s dst flag is that t means DST,
nil means standard time, and -1 means unknown. This differs from
the convention for other components of a decoded time, where nil
means unknown. Fix some places where iso8601-parse mistakenly
treated nil as meaning that the dst flag was unknown.
* doc/lispref/os.texi (Time Parsing):
Adjust to match parse-time-string’s doc string.
* lisp/calendar/iso8601.el (iso8601-parse):
Set dst flag to nil if a numeric time zone or "Z" is given.
(iso8601--decoded-time): Default dst flag to -1 if no dst
flag or zone is given.
* lisp/calendar/time-date.el (decoded-time-set-defaults):
When we don’t have a time zone, set the dst flag consistently
with DEFAULT-ZONE.
* test/lisp/calendar/iso8601-tests.el (test-iso8601-date-years)
(test-iso8601-date-dates, test-iso8601-date-obsolete)
(test-iso8601-date-weeks, test-iso8601-date-ordinals)
(test-iso8601-time, test-iso8601-combined)
(test-iso8601-duration, test-iso8601-intervals)
(standard-test-dates, standard-test-time-of-day-local-time)
(standard-test-time-of-day-fractions)
(nonstandard-test-time-of-day-decimals)
(standard-test-time-of-day-beginning-of-day)
(standard-test-date-and-time-of-day, standard-test-interval):
Adjust tests to match fixed behavior.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/os.texi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 201ca18c1e4..a034ccdcd5c 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -1689,7 +1689,8 @@ following form: | |||
| 1689 | @noindent | 1689 | @noindent |
| 1690 | The format of this list is the same as what @code{decode-time} accepts | 1690 | The format of this list is the same as what @code{decode-time} accepts |
| 1691 | (@pxref{Time Conversion}), and is described in more detail there. Any | 1691 | (@pxref{Time Conversion}), and is described in more detail there. Any |
| 1692 | element that cannot be determined from the input will be set to | 1692 | @code{dst} element that cannot be determined from the input is set to |
| 1693 | @minus{}1, and any other unknown element is set to | ||
| 1693 | @code{nil}. The argument @var{string} should resemble an RFC 822 (or later) or | 1694 | @code{nil}. The argument @var{string} should resemble an RFC 822 (or later) or |
| 1694 | ISO 8601 string, like ``Fri, 25 Mar 2016 16:24:56 +0100'' or | 1695 | ISO 8601 string, like ``Fri, 25 Mar 2016 16:24:56 +0100'' or |
| 1695 | ``1998-09-12T12:21:54-0200'', but this function will attempt to parse | 1696 | ``1998-09-12T12:21:54-0200'', but this function will attempt to parse |