diff options
| author | Paul Eggert | 2018-09-21 14:24:42 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-09-21 14:25:19 -0700 |
| commit | 0bec064454adac2bdff04a11bbdfaa79aa4ce052 (patch) | |
| tree | ab85b4e46d2ab44dd3d02b85a5a540470842e470 /etc | |
| parent | 167274d44f1ccaee65a5b68e15c3ed79a53447d1 (diff) | |
| download | emacs-0bec064454adac2bdff04a11bbdfaa79aa4ce052.tar.gz emacs-0bec064454adac2bdff04a11bbdfaa79aa4ce052.zip | |
Fix ambiguity in nil DST flag
Formerly nil meant both that DST was not in effect and that
the DST flag was unknown, and different functions interpreted
the flag differently. Now the meaning is consistently nil for
DST not in effect, and -1 for DST flag not known.
* doc/lispref/os.texi (Time Conversion): The DST slot is
now three-valued, not two-.
* doc/misc/emacs-mime.texi (time-date): Adjust to new behavior.
* etc/NEWS: Mention this.
* lisp/calendar/parse-time.el (parse-time-string):
* src/editfns.c (Fdecode_time):
Return -1 for unknown DST flag.
* test/lisp/calendar/parse-time-tests.el (parse-time-tests):
Adjust tests to match new behavior, and add a new
test for nil vs -1.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 8 |
1 files changed, 8 insertions, 0 deletions
| @@ -1060,6 +1060,14 @@ a multibyte string even if its second argument is an ASCII character. | |||
| 1060 | ** (format "%d" X) no longer mishandles a floating-point number X that | 1060 | ** (format "%d" X) no longer mishandles a floating-point number X that |
| 1061 | does not fit in a machine integer. | 1061 | does not fit in a machine integer. |
| 1062 | 1062 | ||
| 1063 | +++ | ||
| 1064 | ** In the DST slot, encode-time and parse-time-string now return -1 | ||
| 1065 | if it is not known whether daylight saving time is in effect. | ||
| 1066 | Formerly they were inconsistent: encode-time returned t in this | ||
| 1067 | situation, whereas parse-time-string returned nil. Now they | ||
| 1068 | consistently use use nil to mean that DST is not in effect, and use -1 | ||
| 1069 | to mean that it is not known whether DST is in effect. | ||
| 1070 | |||
| 1063 | ** New JSON parsing and serialization functions 'json-serialize', | 1071 | ** New JSON parsing and serialization functions 'json-serialize', |
| 1064 | 'json-insert', 'json-parse-string', and 'json-parse-buffer'. These | 1072 | 'json-insert', 'json-parse-string', and 'json-parse-buffer'. These |
| 1065 | are implemented in C using the Jansson library. | 1073 | are implemented in C using the Jansson library. |