Changeset 396


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

fixed bug in time output, fixes #222

Location:
trunk
Files:
1 added
2 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  }
  • trunk/test/Makefile.am

    r373 r396  
    2222# 02111-1307, USA.
    2323
    24 check_PROGRAMS = gnuplot_pipe parser trac utility
     24check_PROGRAMS = date gnuplot_pipe parser trac utility
    2525
    2626TESTS = $(check_PROGRAMS)
    27 # this test is only for developers since we do not distribute test repository
     27# these tests are only for developers since we do not distribute test repository
    2828if WCTESTS
    2929TESTS += test_repo.sh check_repo_status.sh
     
    3434AM_CPPFLAGS = -I@top_srcdir@/lib
    3535
     36date_SOURCES = date.cc
    3637gnuplot_pipe_SOURCES = gnuplot_pipe.cc
    3738parser_SOURCES = parser.cc
Note: See TracChangeset for help on using the changeset viewer.