Closed Bug 1135749 Opened 10 years ago Closed 2 years ago

ICALJS=true shows wrong event time

Categories

(Calendar :: ICAL.js Integration, defect)

Lightning 3.3
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1149470

People

(Reporter: karl.rossing, Unassigned)

References

Details

(Whiteboard: [timezone])

Attachments

(3 files)

Attached file timezone-dst-error.ics β€”
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36

Steps to reproduce:

Lightning is set to America/Chicago timezone.

The invite below came from America/New_York

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Eastern Standard Time
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;CN="Sender":MAILTO:sender@domain.com
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN='
 recipient':MAILTO:recipient1@domain.com
DESCRIPTION;LANGUAGE=en-US:When: Friday\, February 20\, 2015 4:30 PM-5:00 P
 M (UTC-05:00) Eastern Time (US & Canada).\nWhere: Conference Call\n\nNote:
  The GMT offset above does not reflect daylight saving time adjustments.\n
 \n*~*~*~*~*~*~*~*~*~*\n\n\n\n\n\n-+-----+-----+-----+-----+-----+-----+---
SUMMARY;LANGUAGE=en-US:Marketing Meeting
DTSTART;TZID=Eastern Standard Time:20150220T163000
DTEND;TZID=Eastern Standard Time:20150220T170000
UID:040000008200E00074C5B7101A82E00800000000F09373A52642D001000000000000000
 010000000E2FF14EDCE8F594BB2FA47F6B93F87A2
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20150220T211724Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:2
LOCATION;LANGUAGE=en-US:Conference Call
X-MICROSOFT-CDO-APPT-SEQUENCE:2
X-MICROSOFT-CDO-OWNERAPPTID:1355163615
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DISALLOW-COUNTER:FALSE
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR



Actual results:

With calendar.icaljs=false the invite displays as 3:30PM start time in america/Chicago which is correct

With calendar.icaljs=true the invite displays as 4:30PM  start time in america/Chicago
 which is wrong.
Attached ics file of the invite
There are some timezone fixes in future lightning releases. I wonder if this issue if fixed in one of those.
It also looks like this is a DST offset issue.
Changing the ics file from:
DTSTART;TZID=Eastern Standard Time:20150220T163000
DTEND;TZID=Eastern Standard Time:20150220T170000

to:
DTSTART;TZID=America/New_York:20150228T163000
DTEND;TZID=America/New_York:20150228T170000

Seems to fix the problem. Lightning recognizes America/New_York (Olson Timezone) and doesn't recognize Eastern Standard Time.
Tested with TB 38.0a1 and Lightning 4.0a1 and the issue still persists. I'm going to try to roll back to an older version of TB + Lightning and see if it ever worked with icaljs=true
Lightning 2.6 and 3.3 also have this problem
Comment 2 https://bugzilla.mozilla.org/show_bug.cgi?id=1082286#c2 seems to be the issue I have but that issue was resolved in 3.9 according to https://bugzilla.mozilla.org/buglist.cgi?quicksearch=ALL%20%3Acalendar%20resolution%3AFIXED%20milestone%3A3.9&list_id=12037923

Now I can't seem to find a link to download 3.9b1.

I did find lightning 3.9A2 with TB 37.0A2 but i'm still having the timezone issue.
What I know there's only support for Olson TZ yet, as you already figured out above. I would expect you expirience this with icaljs disabled as well. Is that the cade?

@Philipp, Geoff: is there any chance to deal wirh TZs like this - maybe we can add more aliases to the json, if there is a 1:1 mapping.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(philipp)
Flags: needinfo?(geoff)
We have (or had?) proper support for third party timezone definitions in Lightning, as long as there is a matching VTIMEZONE definition for the timezone referenced by the TZID in the calendar.
If the correct thing is shown with libical then it's very unlikely to be a fault with the timezones themselves, as both libraries use the same timezone service and zones database. I would assume it's a fault in ical.js.
Flags: needinfo?(geoff)
(In reply to MakeMyDay from comment #9)
> What I know there's only support for Olson TZ yet, as you already figured
> out above. I would expect you expirience this with icaljs disabled as well.
> Is that the cade?
> 
> @Philipp, Geoff: is there any chance to deal wirh TZs like this - maybe we
> can add more aliases to the json, if there is a 1:1 mapping.

I think we could probably add common things like "Eastern Standard Time" to the aliases list. When I did that the event showed at 16:30 America/New York, which is what I'd expect.

(Is the event actually showing up as local time, not specifically America/Chicago, because the zone doesn't exist? If so, why does libical do something different?)
Attachment #8568042 - Attachment mime type: text/calendar → text/plain
Attachment #8568048 - Attachment mime type: text/calendar → text/plain
It is not yet confirmed that it is working with libical. Karl, can you please give it a try?

The ICS shows proper tz definition and referencing, so there might be something broken due to ssitter's comment above.
Flags: needinfo?(karl.rossing)
The attached ics files work fine in libical (calendar.icaljs=false).
Flags: needinfo?(karl.rossing)
The Windows timezone definitions seem to be defined already in chrome://calendar/content/WindowsNTToZoneInfoTZId.properties
I fixed the problem by adding to <lightning dir>/timezones/zones.json
    },
    "Eastern Standard Time": {
      "aliasTo": "America/New_York"
    }

That worked with lightning 4.1a1 BUT I need to find a fix for 3.9b1 which I can't find a download for.
I used https://github.com/mozilla/releases-comm-central/blob/master/calendar/base/src/WindowsNTToZoneInfoTZId.properties to update zones.json

Presumably those are the proper windows timezone names. I now need a way of verifying the Alias to the Zone in the json file. I'm not sure how to do that.
While the aliases might be a working intermediate solution, I think we should rather make sure that external timezone definitions are supported with ical.js. From what I read above, its working in libical, so we really need to figure out what is acting differently with ical.js.

If we additionally use the aliases, there are a few double mappings. I've used the primary mappings for the gdata provider, see http://mxr.mozilla.org/comm-central/source/calendar/providers/gdata/modules/timezoneMap.jsm But looking at http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml you see its not that simple.
Flags: needinfo?(philipp)
Whatever the fix, can it get put into 4.0?
That largely depends on the impact of the fix and the need for someone to drive this bug.
>That largely depends on the impact of the fix and the need for someone to drive this bug.

I'm willing to test when someone figures out a better fix.

It looks like earlybird has lightning integrated into it. The daily updates end up overwriting my zones.json changes.
(In reply to Karl Rossing from comment #22)
Not yet. But the nightly test builds of Lightning will automatically update itself to the latest nightly test build. You can disable automatic extension update from menu Add-ons - Extensions - Lightning but I would recommend to keep them enabled. Earlybird is a moving target and a Lightning build from a few days ago might not work with todays Earlybird build.
Depends on: 1149423
Whiteboard: [timezone]
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1149470
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: