This commit is contained in:
gabime 2016-08-22 20:54:18 +03:00
parent 20cb73e9da
commit b13735dc22
5 changed files with 253 additions and 251 deletions

View File

@ -253,8 +253,10 @@ inline int utc_minutes_offset(const std::tm& tm = details::os::localtime())
#if defined(sun) || defined(__sun) #if defined(sun) || defined(__sun)
// 'tm_gmtoff' field is BSD extension and it's missing on SunOS/Solaris // 'tm_gmtoff' field is BSD extension and it's missing on SunOS/Solaris
struct helper { struct helper
static long int calculate_gmt_offset(const std::tm & localtm = details::os::localtime(), const std::tm & gmtm = details::os::gmtime()) { {
static long int calculate_gmt_offset(const std::tm & localtm = details::os::localtime(), const std::tm & gmtm = details::os::gmtime())
{
int local_year = localtm.tm_year + (1900 - 1); int local_year = localtm.tm_year + (1900 - 1);
int gmt_year = gmtm.tm_year + (1900 - 1); int gmt_year = gmtm.tm_year + (1900 - 1);