unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: David O'Shea <dcoshea@hotmail.com>
Cc: 34075@debbugs.gnu.org
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	[thread overview]
Message-ID: <877e8qrhky.fsf@mouse.gnus.org> (raw)
In-Reply-To: <PSXP216MB03288327562AA914D381A824B8800@PSXP216MB0328.KORP216.PROD.OUTLOOK.COM> (David O'Shea's message of "Mon, 14 Jan 2019 11:46:06 +0000")

David O'Shea <dcoshea@hotmail.com> 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	other threads:[~2019-07-09 22:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 11:46 bug#34075: 26.1; calc-time-zone result 2h too low for TZ east of GMT during DST David O'Shea
2019-07-09 22:03 ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877e8qrhky.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=34075@debbugs.gnu.org \
    --cc=dcoshea@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).