mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-19 11:27:34 +00:00
Allow timezone defaults in decoded-time-set-defaults
* lisp/calendar/time-date.el (decoded-time-set-defaults): Allow passing in a default time zone, as this seems to be something callers seem to do.
This commit is contained in:
parent
4dcb692de0
commit
fa648a59c9
1 changed files with 5 additions and 1 deletions
|
|
@ -512,7 +512,7 @@ changes in daylight saving time are not taken into account."
|
|||
"Return a `decoded-time' structure with only the keywords given filled out."
|
||||
(list second minute hour day month year nil dst zone))
|
||||
|
||||
(defun decoded-time-set-defaults (time)
|
||||
(defun decoded-time-set-defaults (time &optional default-zone)
|
||||
"Set any nil values in `decoded-time' TIME to default values.
|
||||
The default value is based on January 1st, 1970 at midnight.
|
||||
|
||||
|
|
@ -536,6 +536,10 @@ TIME is modified and returned."
|
|||
(when (and (not (decoded-time-zone time))
|
||||
(not (decoded-time-dst time)))
|
||||
(setf (decoded-time-dst time) -1))
|
||||
|
||||
(when (and (not (decoded-time-zone time))
|
||||
default-zone)
|
||||
(setf (decoded-time-zone time) 0))
|
||||
time)
|
||||
|
||||
(provide 'time-date)
|
||||
|
|
|
|||
Loading…
Reference in a new issue