Fixed the display date of the calendar items. Created test project for core library, included tests for recurring calendar events.

This commit is contained in:
Burak Kaan Köse
2025-12-29 14:10:09 +01:00
parent f79305f0a6
commit 8613e92b31
33 changed files with 1168 additions and 173 deletions
@@ -63,14 +63,14 @@ public class OutlookChangeProcessor(IDatabaseService databaseService,
var durationInSeconds = (eventEndDateTimeOffset - eventStartDateTimeOffset).TotalSeconds;
// Store dates as UTC in the database
savingItem.RemoteEventId = calendarEvent.Id;
savingItem.StartDate = eventStartDateTimeOffset.DateTime;
savingItem.StartDateOffset = eventStartDateTimeOffset.Offset;
savingItem.EndDateOffset = eventEndDateTimeOffset.Offset;
savingItem.StartDate = eventStartDateTimeOffset.UtcDateTime;
savingItem.DurationInSeconds = durationInSeconds;
// Store the timezone information from the event
// This preserves the original timezone from Outlook, allowing proper reconstruction later
// If no timezone is provided, null will indicate UTC
savingItem.StartTimeZone = calendarEvent.Start?.TimeZone;
savingItem.EndTimeZone = calendarEvent.End?.TimeZone;