emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 73769dc2b8 2/7: In cal-dst, be consistent re default to UTC


From: Paul Eggert
Subject: master 73769dc2b8 2/7: In cal-dst, be consistent re default to UTC
Date: Fri, 30 Dec 2022 00:32:26 -0500 (EST)

branch: master
commit 73769dc2b872441eb0b8565e1090e97fc0b5d521
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    In cal-dst, be consistent re default to UTC
    
    * lisp/calendar/cal-dst.el (calendar-standard-time-zone-name)
    (calendar-daylight-time-zone-name):
    When using alphabetic time zone abbreviations, default to "UTC"
    rather than to "EST" or "EDT", to be consistent with the behavior
    when using numeric time zone abbreviations.
    Also, in the numeric time zone use "-0000" rather than "+0000"
    to show that the time zone is unknown; this is the RFC 5322
    standard.
---
 lisp/calendar/cal-dst.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el
index 5f601f24d2..c8a65126a4 100644
--- a/lisp/calendar/cal-dst.el
+++ b/lisp/calendar/cal-dst.el
@@ -354,10 +354,10 @@ If the locale never uses daylight saving time, set this 
to 0."
       (if calendar-current-time-zone-cache
           (format-time-string
            "%z" 0 (* 60 (car calendar-current-time-zone-cache)))
-        "+0000")
-    (or (nth 2 calendar-current-time-zone-cache) "EST"))
+        "-0000")
+    (or (nth 2 calendar-current-time-zone-cache) "UTC"))
   "Abbreviated name of standard time zone at `calendar-location-name'.
-For example, \"EST\" in New York City, \"PST\" for Los Angeles."
+For example, \"-0500\" or \"EST\" in New York City."
   :type 'string
   :version "28.1"
   :set-after '(calendar-time-zone-style)
@@ -368,10 +368,10 @@ For example, \"EST\" in New York City, \"PST\" for Los 
Angeles."
       (if calendar-current-time-zone-cache
           (format-time-string
            "%z" 0 (* 60 (cadr calendar-current-time-zone-cache)))
-        "+0000")
-    (or (nth 3 calendar-current-time-zone-cache) "EDT"))
+        "-0000")
+    (or (nth 3 calendar-current-time-zone-cache) "UTC"))
   "Abbreviated name of daylight saving time zone at `calendar-location-name'.
-For example, \"EDT\" in New York City, \"PDT\" for Los Angeles."
+For example, \"-0400\" or \"EDT\" in New York City."
   :type 'string
   :version "28.1"
   :set-after '(calendar-time-zone-style)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]