bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#34075: 26.1; calc-time-zone result 2h too low for TZ east of GMT dur


From: Lars Ingebrigtsen
Subject: bug#34075: 26.1; calc-time-zone result 2h too low for TZ east of GMT during DST
Date: Wed, 10 Jul 2019 00:03:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

David O'Shea <address@hidden> 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





reply via email to

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