Files
EugeneTes 8baa79f074 feat(google-calendar): per-chat connections with cached, single-flight token refresh
Spec ยง4: connections are keyed by the chat's token directory; For(settings, scope).
2026-09-26 20:06:00 +02:00

12 lines
573 B
C#

namespace Volcanic.AgenticCore.Extensions.GoogleCalendar;
/// <summary>Google names zones by IANA id; Windows may hand out Windows ids.</summary>
internal static class ZoneIds
{
/// <summary>The IANA id (Google's zone names), converting a Windows id when needed.</summary>
public static string Name(TimeZoneInfo zone) =>
zone.HasIanaId ? zone.Id : TimeZoneInfo.TryConvertWindowsIdToIanaId(zone.Id, out var iana) ? iana : zone.Id;
public static bool TryFind(string id, out TimeZoneInfo zone) => TimeZoneInfo.TryFindSystemTimeZoneById(id, out zone!);
}