Handling of all day events and auto calendar sync on account creation.

This commit is contained in:
Burak Kaan Köse
2026-03-28 01:44:12 +01:00
parent 686446937b
commit 6f61605c12
16 changed files with 393 additions and 10381 deletions
@@ -180,6 +180,31 @@ public static class GoogleIntegratorExtensions
return null;
}
public static DateTime? GetEventLocalDateTime(EventDateTime calendarEvent)
{
if (calendarEvent == null)
{
return null;
}
if (calendarEvent.DateTimeDateTimeOffset != null)
{
return DateTime.SpecifyKind(calendarEvent.DateTimeDateTimeOffset.Value.DateTime, DateTimeKind.Unspecified);
}
if (calendarEvent.Date != null)
{
if (DateTime.TryParse(calendarEvent.Date, out DateTime eventDateTime))
{
return DateTime.SpecifyKind(eventDateTime, DateTimeKind.Unspecified);
}
throw new Exception("Invalid date format in Google Calendar event date.");
}
return null;
}
/// <summary>
/// Extracts the timezone string from EventDateTime.
/// Returns null for all-day events or if timezone is not specified.