Changeset 503 for trunk/lib/Date.cc


Ignore:
Timestamp:
Nov 27, 2007, 1:56:57 AM (16 years ago)
Author:
Peter Johansson
Message:

Fixes bug in Date class related to Daylight saving time. Also fixes ticket #282 (catch exception 'directory already exists' in main)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Date.cc

    r439 r503  
    116116    std::stringstream sstream(str);
    117117    struct tm* timeinfo = std::localtime(&time_);
     118    size_t timezone_correction = timeinfo->tm_gmtoff;
    118119
    119120    u_int year, month, day, hour, minute, second;
     
    144145
    145146    time_ = mktime(timeinfo);
    146     time_ += timeinfo->tm_gmtoff;
     147    time_ += timezone_correction;
    147148  }
    148149
Note: See TracChangeset for help on using the changeset viewer.