Pankaj
Pankaj

Reputation: 4503

how to get dynamic timezone of system

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

        string indTimeZoneKey = "**India Standard Time**";
        TimeZoneInfo indTimeZone = TimeZoneInfo.FindSystemTimeZoneById(indTimeZoneKey);

Upvotes: 2

Views: 733

Answers (1)

Thomas Zoechling
Thomas Zoechling

Reputation: 34253

You could use the Local property of TimeZoneInfo.

Upvotes: 3

Related Questions