[Verification] Code compiles without error.
Passrate 100% (184/184/0/0/0)
Change-Id: I43c6040ccb21f36bf56985d003103df69e046c86
Signed-off-by: Lukasz Bardeli <l.bardeli@samsung.com>
std::time_t current_time;
std::time(¤t_time);
std::tm* timeinfo = std::localtime(¤t_time);
- return mktime(toDateTm()) + timeinfo->tm_gmtoff;
+ long int gmtoff = timeinfo->tm_gmtoff;
+ if (timeinfo->tm_isdst) {
+ // if dst is set then 1 hour should be subtracted.
+ // 1 hour = 60 second * 60 minutes = 3600 seconds
+ gmtoff -= 3600;
+ }
+ return mktime(toDateTm()) + gmtoff;
}
} // Tizen