开发者

how to get dynamic timezone of system

开发者 https://www.devze.com 2022-12-14 10:41 出处:网络
How can i get my machine timezoneinfo dynamically? right now i am doing it by hard code timezone. string indTimeZoneKey = \"**India Standard Time**\";

How can i get my machine timezoneinfo dynamically? right now i am doing it by hard code timezone.

        string indTimeZoneKey = "**India Standard Time**";
        TimeZoneInfo ind开发者_StackOverflowTimeZone = TimeZoneInfo.FindSystemTimeZoneById(indTimeZoneKey);


You could use the Local property of TimeZoneInfo.

0

精彩评论

暂无评论...
验证码 换一张
取 消