From unknown Mon Aug 18 15:39:10 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#34075 <34075@debbugs.gnu.org> To: bug#34075 <34075@debbugs.gnu.org> Subject: Status: 26.1; calc-time-zone result 2h too low for TZ east of GMT during DST Reply-To: bug#34075 <34075@debbugs.gnu.org> Date: Mon, 18 Aug 2025 22:39:10 +0000 retitle 34075 26.1; calc-time-zone result 2h too low for TZ east of GMT dur= ing DST reassign 34075 emacs submitter 34075 David O'Shea severity 34075 normal tag 34075 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 14 10:00:18 2019 Received: (at submit) by debbugs.gnu.org; 14 Jan 2019 15:00:18 +0000 Received: from localhost ([127.0.0.1]:59184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gj3iq-0006I7-Aq for submit@debbugs.gnu.org; Mon, 14 Jan 2019 10:00:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gj0hB-00083Q-0L for submit@debbugs.gnu.org; Mon, 14 Jan 2019 06:46:23 -0500 Received: from lists.gnu.org ([209.51.188.17]:48727) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gj0h5-0008E3-KE for submit@debbugs.gnu.org; Mon, 14 Jan 2019 06:46:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj0h3-00027p-Sh for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2019 06:46:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.3 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RECEIVED_FROM_WINDOWS_HOST autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gj0h1-0008Be-4y for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2019 06:46:13 -0500 Received: from mail-oln040092254084.outbound.protection.outlook.com ([40.92.254.84]:35024 helo=APC01-PU1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gj0h0-0008A7-DU for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2019 06:46:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ou2gq4v5BlKcOPx9qdOdQ3xHLcecUvR/Ka8Ku0yfST0=; b=huCHZMWE9T+BWC40wThuFnX4jR/TfR2z+yOLPFlIYJCbca8I1UAp4GEmBNk8r4/lTt1lsGmZg3I1bXt7q/GdcXVRdOi6YcnfNGocX1tioM+svzxieJ47mw03s27xrpqKXqdGbfsH872V1/OmKkapznotH69pglz1+8864rhK8ZnutqeokD3EMYBd1V0ucujzQLx8w1EHJZ6kMMM+PWsCnIkww3UTIuNtanENStDfCqG7+LkvVOuGjgnIBYDTZlpLPc+GP2lchNhQ+yfiP+rqxp+3FAnnZmd+bE6WiJTU7/Qno4TfNgbVgyoWtmDp+wcHm8kQFuUEbqvoUO94+inyCw== Received: from PU1APC01FT034.eop-APC01.prod.protection.outlook.com (10.152.252.57) by PU1APC01HT166.eop-APC01.prod.protection.outlook.com (10.152.252.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1471.13; Mon, 14 Jan 2019 11:46:06 +0000 Received: from PSXP216MB0328.KORP216.PROD.OUTLOOK.COM (10.152.252.53) by PU1APC01FT034.mail.protection.outlook.com (10.152.252.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1471.13 via Frontend Transport; Mon, 14 Jan 2019 11:46:06 +0000 Received: from PSXP216MB0328.KORP216.PROD.OUTLOOK.COM ([fe80::ad22:5ecb:58b2:23fa]) by PSXP216MB0328.KORP216.PROD.OUTLOOK.COM ([fe80::ad22:5ecb:58b2:23fa%4]) with mapi id 15.20.1516.019; Mon, 14 Jan 2019 11:46:06 +0000 From: David O'Shea To: "bug-gnu-emacs@gnu.org" Subject: 26.1; calc-time-zone result 2h too low for TZ east of GMT during DST Thread-Topic: 26.1; calc-time-zone result 2h too low for TZ east of GMT during DST Thread-Index: AQHUq/6jyo5LhyxQAEmEles594kURQ== Date: Mon, 14 Jan 2019 11:46:06 +0000 Message-ID: Accept-Language: en-AU, en-US Content-Language: en-AU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:0F524902DB8DC8D5D9B210BF2756E371145FC79CC9CF5C04F1B7230AD6E46C8B; UpperCasedChecksum:F9407884D07C8B54E363869DE51746FC0775DF9297EF019DE26560F910F1B217; SizeAsReceived:6885; Count:43 x-tmn: [z9HqLa+sZL6uxUz8v3iCGQGZRhmCQ81nNJknxJ82g98=] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; PU1APC01HT166; 6:vkJ9cB0h6l0Lx1wsGDUqNLT/NTiuTFexaDVuwWUHFBIWlf6/023qurcwwX/aWAvbJ3t7EwRHQ6SuSvIEycOB5NFqx52TzlvzdpdvLkSE6Z3wRvxhI1zIV4xmsgcfcYLeNMATKiSpc0fvSfq7siF+h+hdHlzMn9ndT6O5U6Pix4i94UrMDofOVXPMNYNfpW1LKIM9gnryalb9z/Xlu8EqJWr6O7Gnber7PuAe339/WLsJDPMCRfvqRdAqfZ2JcBZtYcEWM0eHVUhZflWf4ZCwYxz8I5InMjtGTgMNPdzvBUTLahAJlJ4Wa3/k6Q4cZQNAMpsyFMF7NWZjv72hHvhLigKvAQaWscsX2LccyaMQEwj4dnye+ICkuCJUheE4YFR/OxE6CR0UrG4kXennXyvxD0SgLuili8xjpU45ALbziRoxen9Adfsx900ITbiu8cRykEp6vUla/LouM8qHg2ZIMw==; 5:mzEhFA2L4iqfyzCXb7BzmvZy38AYxHKWTk/K2zNf1ZcKRoZ451Cze9113Xr29Inc7TpLgXZBQD30NREfX1WkOzV6zvxlnvI+Pbq49vRzUC4+EQKe9DV/oZH1kiSQEZly+ZUVL+FyjgVnWFBm70bjPEGem9vuCvsN8HGT2IBUBR8=; 7:Hgy2w+IbIYlN7jgCVX/EZl06Y2dtdE/Yxh+6Qau3iY7Vsddo6roaBKb6AYbtsYDMayhJh2A4WDmFSP6jEJa9hEesdxq/WeGcsLtZ7vVfGymuTlGMmw4RfwIUGBY9roO3dgdRVHWydLmOKQAM9cw8uQ== x-incomingheadercount: 43 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031323274)(2017031324274)(2017031322404)(1601125500)(1603101475)(1701031045); SRVR:PU1APC01HT166; x-ms-traffictypediagnostic: PU1APC01HT166: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(4566010)(82015058); SRVR:PU1APC01HT166; BCL:0; PCL:0; RULEID:; SRVR:PU1APC01HT166; x-microsoft-antispam-message-info: 7aFWqHXS4lHU55gcZaPqprfIcZ0sAtnoSUp5LrXA7xDFECAGEF8MDB/5lgbJW/R3 Content-Type: multipart/alternative; boundary="_000_PSXP216MB03288327562AA914D381A824B8800PSXP216MB0328KORP_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: d4d70346-2c10-4f39-8c00-e767963926d9 X-MS-Exchange-CrossTenant-Network-Message-Id: f07e6277-bb23-4ac3-52da-08d67a15de41 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: d4d70346-2c10-4f39-8c00-e767963926d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jan 2019 11:46:06.0518 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1APC01HT166 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.254.84 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 14 Jan 2019 10:00:09 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --_000_PSXP216MB03288327562AA914D381A824B8800PSXP216MB0328KORP_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable calc-time-zone returns time zone offset 2 hours less than expected for a time zone ahead of UTC (east of Greenwich) when daylight savings is active and the time zone is not specified within Emacs and instead is fetched from the system. Procedure to reproduce on a CentOS Linux system where /etc/localtime is a symlink to /usr/share/zoneinfo/Australia/Sydney and daylight savings time is active (e.g. on 14/Jan/2019): 1. Start calculator: M-x calc RET 2. Get the time zone offset: t Z 3. Convert it to hours: 3600 / For this location and time of year (daylight savings active), the offset should be 11 hours, but the result of the above is 9. I get the same behaviour with Emacs 24.2 (also built by myself) and Emacs 24.3.1 as shipped by CentOS (RPM version 24.3-20.el7_4). The offset is correct when daylight savings time is not active. The info node "(calc) Time Zones" shows these default time zone definitions are available in the calculator: > YST PST MST CST EST AST NST GMT WET MET MEZ > 9 8 7 6 5 4 3.5 0 -1 -2 -2 These are negated compared to the usual convention of positive offsets being used for time zones ahead of UTC (east of Greenwich) as is followed by the function current-time-zone. It would seem to me then that for consistency with calculator's convention I should actually be getting a negative result from calc-time-zone, but I don't, and I think that's related to the absolute value of the offset being wrong. It seems that when I invoke calc-time-zone, math-get-calendar-tzinfo is called to get the timezone offset, and it does this: (setq math-calendar-tzinfo (list (* 60 (abs (nth 0 tzinfo))) (* 60 (nth 1 tzinfo))))))) I think the call to abs probably successfully converts the operating system's view of the timezone offset from negative to positive for timezones west of Greenwich, but fails to account for timezones east of Greenwich. When I change that code to just invert the sign on the timezone: (setq math-calendar-tzinfo (list (* -60 (nth 0 tzinfo)) (* 60 (nth 1 tzinfo))))))) I get a result of -11 from the sequence of steps shown at the top of this bug report. I didn't check closely to make sure that inverting the sign is actually the correct behaviour but it's at least somewhat consistent with the other code in making the offset negative for a timezone east of Greenwich, and seems to work for this specific case. I'm not considering this bug to be about the fact that the timezone offset sign is inverted compared to usual conventions - and not filing a separate bug about that - because (a) that might just be personal preference and (b) changing it would presumably break any local changes users may have made to math-tzone-names, so I imagine it'd be pretty tricky. In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu) of 2019-01-14 built on System Description: CentOS release 6.3 (Final) Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Welcome to the GNU Emacs Calculator! Press =91?=92 or =91h=92 for help, = =91q=92 to quit t- Configured using: 'configure --prefix=3D/opt/emacs-26.1' Configured features: SOUND NOTIFY LIBSELINUX GNUTLS LIBXML2 ZLIB THREADS Important settings: value of $LANG: en_US.utf8 value of $XMODIFIERS: @im=3Dnone locale-coding-system: utf-8-unix Major mode: Calculator Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail tool-bar rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils calc-arith cal-dst cal-menu calendar cal-loaddefs calc-alg calc-forms calc-ext calc-misc calc-menu easymenu calc calc-loaddefs calc-macs time-date elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote inotify multi-tty make-network-process emacs) Memory information: ((conses 16 129204 8727) (symbols 48 22926 1) (miscs 40 39 132) (strings 32 34692 1702) (string-bytes 1 946707) (vectors 16 15734) (vector-slots 8 477414 6086) (floats 8 57 256) (intervals 56 207 0) (buffers 992 13) (heap 1024 21719 738)) --_000_PSXP216MB03288327562AA914D381A824B8800PSXP216MB0328KORP_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
calc-time-zone returns time zone offset 2 hours less than expected fo= r
a time zone ahead of UTC (east of Greenwich) when daylight savings is<= br>
active and the time zone is not specified within Emacs and instead is<= br>
fetched from the system.

Procedure to reproduce on a CentOS Linux system where /etc/localtime i= s
a symlink to /usr/share/zoneinfo/Australia/Sydney and daylight savings=
time is active (e.g. on 14/Jan/2019):

1. Start calculator:         M-x calc RET
2. Get the time zone offset: t Z
3. Convert it to hours:      3600 /

For this location and time of year (daylight savings active), the offs= et
should be 11 hours, but the result of the above is 9.

I get the same behaviour with Emacs 24.2 (also built by myself) and
Emacs 24.3.1 as shipped by CentOS (RPM version 24.3-20.el7_4).

The offset is correct when daylight savings time is not active.

The info node "(calc) Time Zones" shows these default time z= one
definitions are available in the calculator:

>      YST  PST  MST  CST  EST &= nbsp;AST    NST    GMT   WET     MET &nb= sp;  MEZ
>       9    8    7    = ;6    5    4     3.5     0   &= nbsp; -1      -2     -2

These are negated compared to the usual convention of positive offsets=
being used for time zones ahead of UTC (east of Greenwich) as is
followed by the function current-time-zone.  It would seem to me = then
that for consistency with calculator's convention I should actually be=
getting a negative result from calc-time-zone, but I don't, and I
think that's related to the absolute value of the offset being wrong.<= br>

It seems that when I invoke calc-time-zone, math-get-calendar-tzinfo
is called to get the timezone offset, and it does this:

      (setq math-calendar-tzinfo
            (list (* 60 (abs (nth 0 tzin= fo)))
                  (* 60 (= nth 1 tzinfo)))))))

I think the call to abs probably successfully converts the operating
system's view of the timezone offset from negative to positive for
timezones west of Greenwich, but fails to account for timezones east
of Greenwich.

When I change that code to just invert the sign on the timezone:

      (setq math-calendar-tzinfo
            (list (* -60 (nth 0 tzinfo))=
   (* 60 (nth 1 tzinfo)))))))

I get a result of -11 from the sequence of steps shown at the top of
this bug report.  I didn't check closely to make sure that invert= ing
the sign is actually the correct behaviour but it's at least somewhat<= br>
consistent with the other code in making the offset negative for a
timezone east of Greenwich, and seems to work for this specific case.<= br>

I'm not considering this bug to be about the fact that the timezone
offset sign is inverted compared to usual conventions - and not filing=
a separate bug about that - because (a) that might just be personal
preference and (b) changing it would presumably break any local
changes users may have made to math-tzone-names, so I imagine it'd be<= br>
pretty tricky.


In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu)
 of 2019-01-14 built on <my machine, name redacted>
System Description: CentOS release 6.3 (Final)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Welcome to the GNU Emacs Calculator!  Press =91?=92 or =91h=92 fo= r help, =91q=92 to quit
t-

Configured using:
 'configure --prefix=3D/opt/emacs-26.1'

Configured features:
SOUND NOTIFY LIBSELINUX GNUTLS LIBXML2 ZLIB THREADS

Important settings:
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=3Dnone
  locale-coding-system: utf-8-unix

Major mode: Calculator

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-conf= ig
gnus-util rmail tool-bar rmail-loaddefs mm-decode mm-bodies mm-encode<= br>
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt=
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils calc-arith
cal-dst cal-menu calendar cal-loaddefs calc-alg calc-forms calc-ext
calc-misc calc-menu easymenu calc calc-loaddefs calc-macs time-date
elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hook= s
lisp-float-type tabulated-list replace newcomment text-mode elisp-mode=
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932<= br>
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hoo= k
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5<= br>
base64 format env code-pages mule custom widget hashtable-print-readab= le
backquote inotify multi-tty make-network-process emacs)

Memory information:
((conses 16 129204 8727)
 (symbols 48 22926 1)
 (miscs 40 39 132)
 (strings 32 34692 1702)
 (string-bytes 1 946707)
 (vectors 16 15734)
 (vector-slots 8 477414 6086)
 (floats 8 57 256)
 (intervals 56 207 0)
 (buffers 992 13)
 (heap 1024 21719 738))

--_000_PSXP216MB03288327562AA914D381A824B8800PSXP216MB0328KORP_-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 09 18:03:47 2019 Received: (at 34075) by debbugs.gnu.org; 9 Jul 2019 22:03:47 +0000 Received: from localhost ([127.0.0.1]:34428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkyDD-0002CR-J9 for submit@debbugs.gnu.org; Tue, 09 Jul 2019 18:03:47 -0400 Received: from quimby.gnus.org ([80.91.231.51]:54326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkyDB-0002CH-Jn for 34075@debbugs.gnu.org; Tue, 09 Jul 2019 18:03:46 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkyD7-0001LX-C3; Wed, 10 Jul 2019 00:03:43 +0200 From: Lars Ingebrigtsen To: David O'Shea Subject: Re: bug#34075: 26.1; calc-time-zone result 2h too low for TZ east of GMT during DST References: Date: Wed, 10 Jul 2019 00:03:41 +0200 In-Reply-To: (David O'Shea's message of "Mon, 14 Jan 2019 11:46:06 +0000") Message-ID: <877e8qrhky.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: David O'Shea writes: > It seems that when I invoke calc-time-zone, math-get-calendar-tzinfo > is called to get the timezone offset, and it does this: > > (setq math-calendar-tzinfo > (list (* 60 (abs (nth 0 tzinfo))) > (* [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34075 Cc: 34075@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) David O'Shea writes: > It seems that when I invoke calc-time-zone, math-get-calendar-tzinfo > is called to get the timezone offset, and it does this: > > (setq math-calendar-tzinfo > (list (* 60 (abs (nth 0 tzinfo))) > (* 60 (nth 1 tzinfo))))))) > > I think the call to abs probably successfully converts the operating > system's view of the timezone offset from negative to positive for > timezones west of Greenwich, but fails to account for timezones east > of Greenwich. > > When I change that code to just invert the sign on the timezone: > > (setq math-calendar-tzinfo > (list (* -60 (nth 0 tzinfo)) > (* 60 (nth 1 tzinfo))))))) Yup, seems to give me correct data to (I get -2, which is correct for Oslo in summer time). I'll push the fix to the Emacs trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 09 18:06:29 2019 Received: (at control) by debbugs.gnu.org; 9 Jul 2019 22:06:29 +0000 Received: from localhost ([127.0.0.1]:34434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkyFp-0002Gk-4t for submit@debbugs.gnu.org; Tue, 09 Jul 2019 18:06:29 -0400 Received: from quimby.gnus.org ([80.91.231.51]:54450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkyFo-0002Gc-0H for control@debbugs.gnu.org; Tue, 09 Jul 2019 18:06:28 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkyFl-0001M1-3r for control@debbugs.gnu.org; Wed, 10 Jul 2019 00:06:27 +0200 Date: Wed, 10 Jul 2019 00:06:24 +0200 Message-Id: <875zoarhgf.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #34075 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 34075 fixed close 34075 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 34075 fixed close 34075 27.1 quit From unknown Mon Aug 18 15:39:10 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 07 Aug 2019 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator