Changeset 396 for trunk/lib/Date.cc


Ignore:
Timestamp:
Jun 27, 2007, 5:47:29 PM (14 years ago)
Author:
Peter Johansson
Message:

fixed bug in time output, fixes #222

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Date.cc

    r366 r396  
    2727#include <sstream>
    2828#include <string>
     29
     30#include <iostream>
    2931
    3032namespace theplu {
     
    115117  {
    116118    std::stringstream sstream(str);
    117     struct tm* timeinfo = std::gmtime(&time_);
     119    struct tm* timeinfo = std::localtime(&time_);
    118120
    119121    u_int year, month, day, hour, minute, second;
     
    144146
    145147    time_ = mktime(timeinfo);
    146     timeinfo = std::localtime(&time_);
    147148    time_ += timeinfo->tm_gmtoff;
    148149  }
Note: See TracChangeset for help on using the changeset viewer.