Changeset 503


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)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/svndigest.cc

    r497 r503  
    111111  std::string target_path=option->targetdir() + '/' + file_name(option->root());
    112112  bool need_to_erase_target = node_exist(target_path);
    113   if (need_to_erase_target && !option->force())
    114     throw std::runtime_error(std::string("svndigest: directory (") +
    115                              target_path + ") already exists");
     113  if (need_to_erase_target && !option->force()) {
     114    std::cerr << "svndigest: directory `"
     115              << target_path << "' already exists\n";
     116    exit(-1);
     117  }
    116118
    117119  // Extract repository location
  • 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.