Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting timezone in Windows with C++

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

like image 696
mustafa Avatar asked Aug 15 '11 08:08

mustafa


People also ask

How do I find out my windows TimeZone?

To set your time and time zone in Windows 10, go to Start > Settings > Time & language > Date & time.


1 Answers

GetTimeZoneInformation is probably what you're looking for.

like image 93
Delan Azabani Avatar answered Oct 09 '22 18:10

Delan Azabani