Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::posix_time::from_time_t bug ???
From: Igor R (boost.lists_at_[hidden])
Date: 2009-05-01 11:48:10


IMHO, the output is correct.

Outputs local time:
>         std::cout << "time_t: " << ctime( &t ) << std::endl;

Outputs local time:
>         struct tm* t2 = localtime( &t );
>         std::cout << "struct tm: " << asctime( t2 ) << std::endl;

Outputs GMT time:
>         ptime t3 = from_time_t( t );
>
>         std::cout << "ptime from time_t: " << to_simple_string( t3 ) <<
> std::endl;

Outputs local time:
>         ptime t4 = ptime_from_tm( *t2 );


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net