builttoroam / device_calendar

A cross platform plugin for modifying calendars on the user's device
https://pub.dev/packages/device_calendar
BSD 3-Clause "New" or "Revised" License
259 stars 258 forks source link

Wrong Timezone #506

Closed tungakanui closed 9 months ago

tungakanui commented 9 months ago

Describe the bug I added an event with the timezone Europe/Berlin, it should be GMT+2 (cause it's summer now) instead of GMT+1

To Reproduce Step 1: Add an event with the timezone of 'Europe/Berlin' Step 2: Check the result

Expected behavior It should get the correct timezone.

Screenshots image

Device(s) tested This can be very important as not all device vendors do calendar in the same way.

Flutter doctor Run a flutter doctor so we can rule out env issues

info-trone commented 9 months ago

Could you provide some code of how you load/use the timezone and what package you are using?

laminr commented 9 months ago

Humm Gulfsteam G-IV, so nice!

tungakanui commented 9 months ago

Could you provide some code of how you load/use the timezone and what package you are using? Here's the code I'm using. The package: device_calendar: ^4.3.1 ` final Event event = Event( calendarID, eventId: eventID, title: eventTitle, description: eventDescription, location: eventLocation, start: TZDateTime( getLocation(departureTimeZone), eventStartDate.year, eventStartDate.month, eventStartDate.day, eventStartDate.hour, eventStartDate.minute, eventStartDate.second, ), end: TZDateTime( getLocation(arrivalTimeZone), eventEndDate.year, eventEndDate.month, eventEndDate.day, eventEndDate.hour, eventEndDate.minute, eventEndDate.second, ), );

return _deviceCalendarPlugin.createOrUpdateEvent(event);`
tungakanui commented 9 months ago

I apologize. It's my mistake. I tried to convert time of 1/11, at that time the correct timezone is GMT+1.