1 May
2009
1 May
'09
3:48 p.m.
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 );