Calculate sync dates based on the latest current date in the world

This commit is contained in:
2024-04-17 17:06:01 +02:00
parent 901b26153e
commit 4bcf15cb14
2 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
namespace ConnectionsAPI.Utility
{
public static class TimezoneUtility
{
public static TimeZoneInfo? GetLatestTimezoneOnSystem() =>
TimeZoneInfo.GetSystemTimeZones()
.OrderByDescending(x => x.GetUtcOffset(DateTime.UtcNow))
.FirstOrDefault();
}
}