Incorrect timezone when adding to calendar

Created on 3 December 2024, 7 months ago

Hi there, I have a date and time in the America/Halifax timezone (+0400). My computer is using the America/Halifax timezone. Events are created without any timezone override, but when I add them to calendar via the links, I get the time in America/Halifax PLUS 4 hours.

So if an event is set for 10pm, the add to cal link adds it as 2am. Both Apple and Google (can't test Outlook).

The content of the .ics file is:

BEGIN:VCALENDAR
PRODID:My Website
BEGIN:VTIMEZONE
TZID:America/Halifax
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0400
END:STANDARD
END:VTIMEZONE
VERSION:2.0
BEGIN:VEVENT
UID:4750bf95-e4ad-4f33-bea4-3c5a2c96407c
SUMMARY:Test event 1
DTSTAMP:20241203T165700Z
DTSTART;TZID=America/Halifax:20241218T000000
DTEND;TZID=America/Halifax:20241218T000000
END:VEVENT
END:VCALENDAR

Anything stand out as obviously wrong? Thanks!

πŸ’¬ Support request
Status

Active

Version

1.2

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada mrogers

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mrogers
  • πŸ‡¨πŸ‡¦Canada mandclu

    What kind of field is it?

  • πŸ‡ΊπŸ‡ΈUnited States andreakal

    Hello,
    I am having the same problem. I am using Smart Date | Default field with a start and end time selected. Timezone override - none selected. In the Date Augmenter selections I have tried the following ( Ignore the timezone if it is set to UTC?) both checked and unchecked and get the same +4 hour time jump.

    here is the correct date/time from our webpage:
    Wed, Jun 11 2025, 12 - 2pm

    here is the ics file information:
    BEGIN:VCALENDAR
    PRODID:My Website
    VERSION:2.0
    BEGIN:VEVENT
    UID:9807c4ff-71ed-4abb-8138-c0ad9a3d6407
    SUMMARY:Staff Picnic
    DTSTAMP:20250530T184500Z
    DTSTART:20250611T200000Z
    DTEND:20250611T220000Z
    DESCRIPTION:This year's Staff Picnic will take place on Wednesday, June...
    LOCATION:On Campus
    END:VEVENT
    END:VCALENDAR

    Please let me know if there is a setting I am missing or if this is a problem with the module.
    Thanks!
    -Andrea

  • πŸ‡§πŸ‡ͺBelgium bramvandenbulcke

    We are also getting reports that the timezone is one hour off for some users.

    I can only test with Google Calendar and everything looks fine.

    Setup:

    • Default time zone: Brussels
    • Server time is UTC and we have at the moment Europe/Brussels (CEST), which is +02:00 hours (I'm seeing this info in the status report under Scheduler). This is correct.
    • Add to cal config: time zone override = none

    Output looks fine:

    https://calendar.google.com/calendar/u/0/r/eventedit?ctz=Europe/Brussels&text=Add+to+cal+test&dates=20250624T140000/20250624T160000&details=Details&location=Streetname+-+1+1000+Brussels+Belgium

    BEGIN:VCALENDAR
    PRODID:Client
    BEGIN:VTIMEZONE
    TZID:Europe/Brussels
    BEGIN:STANDARD
    TZOFFSETFROM:+0200
    TZOFFSETTO:+0200
    END:STANDARD
    END:VTIMEZONE
    VERSION:2.0
    BEGIN:VEVENT
    UID:b1fdc840-6e23-4ce9-9858-95e5416237e3
    SUMMARY:Add to cal test
    DTSTAMP:20250618T094900Z
    DTSTART;TZID=Europe/Brussels:20250624T140000
    DTEND;TZID=Europe/Brussels:20250624T160000
    DESCRIPTION:Description
    LOCATION:RHID - Streetname 1 1000 Brussels Belgium
    END:VEVENT
    END:VCALENDAR

    I don't see a direct solution. I can try and test with this Smart Date Format: UTC time + the Add Javascript localization option + Ignore the timezone if it is set to UTC.

  • πŸ‡¨πŸ‡¦Canada mandclu

    Does anyone know if both anonymous and authenticated users are impacted?

  • πŸ‡§πŸ‡ͺBelgium bramvandenbulcke

    I did a test with a Windows + Outlook setup (which I don't have at hand myself) and it was the same logged in and logged out. I did a test logged in with an Editor role.

    The hour is indeed one hour off. On the website we have 15:00 to 16:00. When adding to Outlook on Windows a user sees 16:00 to 17:00.

    When I check with Google on macOS it works fine, logged in and logged out.

  • πŸ‡¨πŸ‡¦Canada mandclu

    @bramvandenbulcke thank you for the work you've put into testing this. When I hear about times being an hour off, I am tempted to think that it could be an issue with daylight savings time.

    I came across this thread which makes it sound as though Outlook has had an issue for some time with this, but unfortunately no solution was ever provided there.

    I also found this thread which shows the contents of an ics file that includes a section that defines sections for normal and daylight savings time:

    BEGIN:STANDARD
    DTSTART:20250406T030000
    TZOFFSETFROM:+1100
    TZOFFSETTO:+1000
    TZNAME:AEST
    RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
    END:STANDARD
    
    BEGIN:DAYLIGHT
    DTSTART:20241006T020000
    TZOFFSETFROM:+1000
    TZOFFSETTO:+1100
    TZNAME:AEDT
    RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU
    END:DAYLIGHT

    That appears to be specifically relevant to recurring events, however, and in the context of that thread doesn't appear to be sufficient to prevent the time added in Outlook from being off.

    That does give me an idea, however. What if you tried manually changing the timezone section of your ics file from this:

    TZID:Europe/Brussels
    BEGIN:STANDARD
    TZOFFSETFROM:+0200
    TZOFFSETTO:+0200
    END:STANDARD
    END:VTIMEZONE
    

    to this?

    TZID:Europe/Brussels
    BEGIN:STANDARD
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0100
    END:STANDARD
    BEGIN:DAYLIGHT
    TZOFFSETFROM:+0200
    TZOFFSETTO:+0200
    END:DAYLIGHT
    END:VTIMEZONE
    

    If that works, we would need to figure out how to manually add this additional DST-related timezone information into the generated ics files.

  • πŸ‡§πŸ‡ͺBelgium bramvandenbulcke

    We did a test with two ICS files, one original and one updated.

    Original:

    BEGIN:VCALENDAR
    PRODID:Test
    BEGIN:VTIMEZONE
    TZID:Europe/Brussels
    BEGIN:STANDARD
    TZOFFSETFROM:+0200
    TZOFFSETTO:+0200
    END:STANDARD
    END:VTIMEZONE
    VERSION:2.0
    BEGIN:VEVENT
    UID:87821e7c-1039-4063-bff1-66b79c05627e
    SUMMARY:Summary text
    DTSTAMP:20250625T074800Z
    DTSTART;TZID=Europe/Brussels:20250708T150000
    DTEND;TZID=Europe/Brussels:20250708T160000
    DESCRIPTION:Description text.\n\n
    END:VEVENT
    END:VCALENDAR
    

    Updated:

    BEGIN:VCALENDAR
    PRODID:Test
    BEGIN:VTIMEZONE
    TZID:Europe/Brussels
    BEGIN:STANDARD
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0100
    END:STANDARD
    BEGIN:DAYLIGHT
    TZOFFSETFROM:+0200
    TZOFFSETTO:+0200
    END:DAYLIGHT
    END:VTIMEZONE
    VERSION:2.0
    BEGIN:VEVENT
    UID:87821e7c-1039-4063-bff1-66b79c05627e
    SUMMARY:Summary text
    DTSTAMP:20250625T074800Z
    DTSTART;TZID=Europe/Brussels:20250708T150000
    DTEND;TZID=Europe/Brussels:20250708T160000
    DESCRIPTION:Description text.\n\n
    END:VEVENT
    END:VCALENDAR
    

    Both show 16:00 to 17:00 in Outlook on Windows. On Google Calendar (via Settings > Import % Export) both are correct.

  • πŸ‡¨πŸ‡¦Canada mandclu

    Question: are you testing the same ics file for both Apple Calendar and Outlook? By design this module generates an ics already optimized for Outlook if you click the Outlook link, so it should already be doing a lot of the things in the linked PR.

  • πŸ‡§πŸ‡ͺBelgium bramvandenbulcke

    I did the testing only with the ICS for Outlook.

Production build 0.71.5 2024