Mason Wheeler
Mason Wheeler

Reputation: 84650

How do I obtain TIME_ZONE_INFORMATION for an aribitrary timezone?

In Windows, if I need a TIME_ZONE_INFORMATION struct for the current time zone, I can just call GetTimeZoneInformation. But what API do I use to get the TIME_ZONE_INFORMATION for an arbitrary time zone that is not the current time zone?

Upvotes: 1

Views: 225

Answers (1)

Roman Ryltsov
Roman Ryltsov

Reputation: 69724

Time zone information is on registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. You can load TZI value and it is exactly what you are looking for, see TIME_ZONE_INFORMATION structure, remarks.

Upvotes: 2

Related Questions