GNU bug report logs - #15408
23.4; icalendar import: daylight saving time

Previous Next

Package: emacs;

Reported by: Christophe Deleuze <christophe.deleuze <at> free.fr>

Date: Wed, 18 Sep 2013 16:07:01 UTC

Severity: normal

Tags: patch

Merged with 18710

Found in versions 23.4, 24.3

Done: Ulf Jasper <ulf.jasper <at> web.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Christophe Deleuze <christophe.deleuze <at> free.fr>
Subject: bug#15408: closed (Re: bug#15408: 23.4; icalendar import:
 daylight saving time)
Date: Wed, 30 Jul 2014 16:34:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#15408: 23.4; icalendar import: daylight saving time

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 15408 <at> debbugs.gnu.org.

-- 
15408: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15408
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ulf Jasper <ulf.jasper <at> web.de>
To: Christophe Deleuze <christophe.deleuze <at> free.fr>
Cc: 15408 <at> debbugs.gnu.org, 15408-done <at> debbugs.gnu.org
Subject: Re: bug#15408: 23.4; icalendar import: daylight saving time
Date: Wed, 30 Jul 2014 18:33:03 +0200
Christophe Deleuze <christophe.deleuze <at> free.fr> writes:

> [This is a small bug in icalendar.el.  A simple fix is provided.

I applied your patch to the trunk (and added a unit test), rev. 117612.

Thank you very much!


[Message part 3 (message/rfc822, inline)]
From: Christophe Deleuze <christophe.deleuze <at> free.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.4; icalendar import: daylight saving time
Date: Wed, 18 Sep 2013 14:54:01 +0200
[Message part 4 (text/plain, inline)]
[This is a small bug in icalendar.el.  A simple fix is provided.
Although tested on version 23.4, I checked the file icalendar.el hasn't
changed in current developpement version (downloaded for bazaar
repository on Sep 4th).]

* bug description

When importing an ics file into a diary file, date/times are not always
correctly converted from UTC to local time zone.

Example: let's import the provided mini.ics icalendar file, where
dates are in UTC (trailing 'Z'), on a system using the Europe/Paris
time zone.  This time zone has a time 2 hours ahead of UTC during
daylight saving and 1 hour ahead otherwise.

The file contains two events, the first one is planned on november 12
2013, from 12:15 to 14:00 UTC, the second one is planned on september
12 2013, from 8:00 to 9:45 UTC.

september 12 2013 is in daylight saving time period, while december 11
2013 is not.  The generated diary file (provided as mini.diary) shows
a 2 hours offset has been added to both events, while it should have
added a single hour offset to the second one.  It has been generated
on september 7 2013, during daylight saving time period.  Please note
that my emacs uses the european date display style, so that september
12 2013 is written as 12/9/2013 in the diary file.

* fix description

The function icalendar--decode-isodatetime in calendar/icalendar.el
calls (current-time-zone) to add current time zone offset when the ics
time is UTC.  However, the function is called without argument,
meaning the returned offset is the one applying at the time of
calling.

It should be called with the (UTC) date/time of the converted
date/time so that computed offset is the one in force at that precise
date/time.

The patch file icalendar.patch fixes the problem.  File
mini.diary-patched is the result of importing mini.ics with the
patched icalendar.el file.

* changelog

Small change in icalendar--decode-isodatetime.


[mini.ics (text/calendar, attachment)]
[mini.diary (text/plain, attachment)]
[mini.diary-patched (text/plain, attachment)]
[icalendar.patch (text/x-diff, attachment)]

This bug report was last modified 10 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.