Getting timezone in Windows with C++

Issue

I want to synchronize Windows and Linux clocks. Windows gets its system clock (with GetSystemTimeAsFileTime function) and sends it to Linux. Then, Linux sets its clock accordingly (with settimeofday function).

I also need to transmit the time zone of Windows, and convert it to Linux standard. How can I get the timezone of Windows in C++?

best wishes,
Mustafa

Solution

GetTimeZoneInformation is probably what you’re looking for.

Answered By – Delan Azabani

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published