Calculate sync dates based on the latest current date in the world
This commit is contained in:
10
Utility/TimezoneUtility.cs
Normal file
10
Utility/TimezoneUtility.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user