I am using clock_gettime() in my C++ program to get the current time. However, the return value is seconds since epoch in UTC. This code can get messed up in my time zone durin
If you are using Windows, you can use this GetTimeZoneInformation, but you have to include the Windows API.
Another methode to achieve this would be the struct tm. You will find the details here: struct tm. "The Daylight Saving Time flag (tm_isdst) is greater than zero if Daylight Saving Time is in effect, zero if Daylight Saving Time is not in effect, and less than zero if the information is not available." I think this is the easier way.