It seems that I found a mistake in WinApi. When I use TimeZoneInfo.Local.DisplayName in Debug in my Visual Studio 2015 it return right variant to me, as example "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius". In release mode(.net native) same api return me "FLE Standard Time". Be greatfull to hear how to get time zone information in other way, or how to fix this issue.
You most likely have missed something in your code. One mistake that I made before, and is easy to make is confusing DisplayName
with DaylightName
:
static void Main(string[] args)
{
var timeZoneName = TimeZoneInfo.Local.DaylightName; //FLE Standard Time
var displayName = TimeZoneInfo.Local.DisplayName; //(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius
}
For reference, you can check Time Zone IDs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With