Daylight saving time of current tz
- by spam2
Hi,
in my c++ software I've used Boost in some parts and also for the local time.
OK, now my problem is to make a check if in my machine is active or not the DST.
With the follow part of code I can know only the difference from the UTC time. In my case the difference is 2 hours because is active the DST
ptime tLoc = second_clock::local_time();
ptime tUTC = second_clock::universal_time();
time_duration tDiff = tUTC - tLoc;
local_time_zone = tDiff.hours();
I think that the boolean funcion has_dst() can help, right?
My system is Debian GNU/Linux.
Thanks