This is a follow up question to DateTime.Now vs system time
In normal .NET TimeZoneInfo.ClearCachedData()
is available to sync the application the system timezone.
In Universal Windows version of TimeZoneInfo
this method is not present.
Can I somehow sync the timezone info?
Solution 1
using System.Reflection;
MethodInfo clearCachedData = typeof(TimeZoneInfo).GetMethod("ClearCachedData",
BindingFlags.NonPublic | BindingFlags.Static);
if (clearCachedData != null)
{
clearCachedData.Invoke(null, null);
}
Tested on:
Solution 2