Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] when a calendar event listed as New York TZ is processed on a later timezone (chicago) the time shown is incorrect #3701

Open
2 of 4 tasks
sdetweil opened this issue Jan 22, 2025 · 18 comments

Comments

@sdetweil
Copy link
Collaborator

Environment

System information:
SYSTEM: manufacturer: System manufacturer; model: System Product Name; virtual: false
OS: platform: linux; distro: Ubuntu; release: 22.04.5 LTS; arch: x64; kernel: 5.15.0-130-generic
VERSIONS: electron: 32.2.8; used node: 22.13.0; installed node: 22.13.0; npm: 10.9.2; pm2: 5.4.3
OTHER: timeZone: America/Chicago; ELECTRON_ENABLE_GPU: undefined

Which start option are you using?

npm run start

Are you using PM2?

No

Module

calendar

Have you tried disabling other modules?

  • Yes
  • No

Have you searched if someone else has already reported the issue on the forum or in the issues?

  • Yes

What did you do?

Steps to reproduce the issue:
use this ics event

BEGIN:VEVENT
DTSTART;TZID=America/New_York:20240918T183000
DTEND;TZID=America/New_York:20240918T203000
RRULE:FREQ=WEEKLY;BYDAY=WE
EXDATE;TZID=America/New_York:20241127T183000
EXDATE;TZID=America/New_York:20241225T183000
DTSTAMP:20250122T045443Z
UID:[email protected]
CREATED:20240916T131843Z
LAST-MODIFIED:20241222T235014Z
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Derby
TRANSP:OPAQUE
END:VEVENT

view from system on Chicago timezone

What did you expect to happen?

time displayed 17:30
as event is 18L30 East coast time

What actually happened?

time displayed is 22:30

Additional comments

No response

Participation

  • I am willing to submit a pull request for this change.
@sdetweil sdetweil added the bug label Jan 22, 2025
sdetweil added a commit to sdetweil/MagicMirror that referenced this issue Jan 22, 2025
rejas pushed a commit that referenced this issue Jan 23, 2025
fixes #3701 

offset calculation wrong when user looking back at east coast event

added testcase
@pclark1985
Copy link

Adding my own example here in the hopes it will help. I am pulling my work Outlook calendar into MM through an ics file, and have the below event that was created by someone in ET, while I am in Chicago in CT. The event is today at 2pm CT, but was showing on my MM as 5pm. I tried modifying the 2 lines of code specified in pull 3702, but that makes it show as noon now. Perhaps there are other edits I simply missed.

BEGIN:VEVENT
RECURRENCE-ID;TZID=Eastern Standard Time:20250203T110000
SUMMARY:Content/Product Weekly Sync
DTSTART;TZID=Eastern Standard Time:20250203T150000
DTEND;TZID=Eastern Standard Time:20250203T153000
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20250203T165328Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:7
LOCATION:Microsoft Teams Meeting
X-MICROSOFT-CDO-APPT-SEQUENCE:7
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:3
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MICROSOFT-REQUESTEDATTENDANCEMODE:DEFAULT
X-MICROSOFT-ISRESPONSEREQUESTED:FALSE
END:VEVENT

@sdetweil
Copy link
Collaborator Author

sdetweil commented Feb 3, 2025

are you using MagicMirror version 2.30

@pclark1985
Copy link

Yes. Installed fresh just 2 weeks ago.

@sdetweil
Copy link
Collaborator Author

sdetweil commented Feb 3, 2025

OK, I'll check, but it's probably the time zone value.
Javascript uses the IANA spec names. I have added support for multiple different ms timezone settings, this is yet another one

@sdetweil
Copy link
Collaborator Author

sdetweil commented Feb 3, 2025

can you add

"DEBUG",

To end of the logLevel list in config.js
And start MagicMirror like this

cd ~/MagicMirror
npm start &> somefile.txt

Then after it displays the events ctrl-q
And send me the somefile.txt
Note it will have the full calendar urls, so you
may want to edit those

Same user id at gmail

@sdetweil
Copy link
Collaborator Author

sdetweil commented Feb 4, 2025

can you install the develop branch
see https://forum.magicmirror.builders/topic/14327/testing-new-fixes-or-solving-current-problems-with-next-release-code

make sure to switch back to master
this fix is after 2.30 and the clipping fix

later to upgrade to next release use my upgrade script it will adjust the branch as required.

@pclark1985
Copy link

Confirmed the develop branch works. Thank you! I'll switch back to master and await the next release in a couple of months. Great work!

@sdetweil
Copy link
Collaborator Author

sdetweil commented Feb 5, 2025

you can stay on develop til then april 1

i meant switch back to
master before getting develop

@nrabins
Copy link

nrabins commented Feb 10, 2025

I have another datapoint. I have an event that displays at these times:

  • master: 3:30pm
  • develop: 10:30am
  • reality: 12:30pm

Here is the iCal for that event (minus personal information):


SUMMARY:*****
TRANSP:OPAQUE
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER:-P0DT0H10M0S
DESCRIPTION:*****
END:VALARM
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=America/New_York:20250213T133000
DTEND;TZID=America/New_York:20250213T143000
DTSTAMP:20250210T014138Z
ORGANIZER;*****
ATTENDEE;*****
ATTENDEE;*****
ATTENDEE;*****
ATTENDEE;*****
ATTENDEE;*****
RECURRENCE-ID;TZID=America/New_York:20250213T133000
CREATED:20241001T145133Z
DESCRIPTION:*****
LAST-MODIFIED:20250202T220346Z
LOCATION:*****
SEQUENCE:3
STATUS:CONFIRMED

I'm in CST; I'm not sure what time zone the original event was made in (though I see New York in the iCal). Thoughts?

@sdetweil
Copy link
Collaborator Author

sdetweil commented Feb 10, 2025

@nrabins please checkout/try the develop branch as listed above, which contains the fix for this issue

@nrabins
Copy link

nrabins commented Feb 11, 2025

@sdetweil I have (the develop data point above was obtained from an up-to-date develop branch) and it doesn't match the expected 12:30 time.

@sdetweil
Copy link
Collaborator Author

because it has a recurrence id it is part of a recurring sequence, rrule

can you find that? the uid will match

@nrabins
Copy link

nrabins commented Feb 11, 2025

Does this look correct? It was the only RRULE in any of the events with that UID.

RRULE:FREQ=WEEKLY;BYDAY=TH

@sdetweil
Copy link
Collaborator Author

i need to see both complete vevents
(dont need attendees)

@nrabins
Copy link

nrabins commented Feb 11, 2025

Event with RRULE:

BEGIN:VEVENT
DTSTART;TZID=America/New_York:20250116T133000
DTEND;TZID=America/New_York:20250116T143000
RRULE:FREQ=WEEKLY;BYDAY=TH
EXDATE;TZID=America/New_York:20250206T133000
DTSTAMP:20250210T014138Z
ORGANIZER;*****
UID:[email protected]
CREATED:20241001T145133Z
DESCRIPTION:*****
LAST-MODIFIED:20250202T220346Z
LOCATION:*****
SEQUENCE:3
STATUS:CONFIRMED
SUMMARY:*****
TRANSP:OPAQUE
END:VEVENT

Upcoming event:

BEGIN:VEVENT
DTSTART;TZID=America/New_York:20250213T133000
DTEND;TZID=America/New_York:20250213T143000
DTSTAMP:20250210T014138Z
ORGANIZER;*****
UID:[email protected]
RECURRENCE-ID;TZID=America/New_York:20250213T133000
CREATED:20241001T145133Z
DESCRIPTION:*****
LAST-MODIFIED:20250202T220346Z
LOCATION:*****
SEQUENCE:3
STATUS:CONFIRMED
SUMMARY:*****
TRANSP:OPAQUE
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER:-P0DT0H10M0S
DESCRIPTION:This is an event reminder
END:VALARM
END:VEVENT

@sdetweil
Copy link
Collaborator Author

thx, i will debug tomorrow morning

@sdetweil
Copy link
Collaborator Author

sdetweil commented Feb 11, 2025

works perfect with the develop branch after this issues pr merge, 3 weeks ago

Mac-mini:MagicMirror sam$ git branch
* develop
  master
Mac-mini:MagicMirror sam$ 

find this code in calendarfetcherutils.js

						eventDiff = nowDiff - eventDiff; //-180     //<---- this is the new line, 669
						Log.debug("now looking back east delta diff=", eventDiff);

Image

@sdetweil
Copy link
Collaborator Author

@nrabins can you verify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants