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

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 10 Jul 2019 00:03:41 +0200

David O'Shea <[email-masked]> 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