I need to get time zone of PC as below format.
(UTC+07:00) Bangkok, Hanoi, Jakarta
How can I get it as a string ?
Just use the TimeZoneInfo.DisplayName
property:
var zone = TimeZoneInfo.Local; // For example
Console.WriteLine(zone.DisplayName);
Or for your precise example:
var zone = TimeZoneInfo.FindSystemTimeZoneById("SE Asia Standard Time");
Console.WriteLine(zone.DisplayName); // (UTC+07:00) Bangkok, Hanoi, Jakarta
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