Boost logo

Boost :

Subject: [boost] [locale] Strange(?) result in example code
From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2011-04-15 15:33:16

#include <boost/locale.hpp>

#include <iostream>
//#include <ctime>

using namespace boost::locale;

int main()
   generator gen;
   //std::locale::global(gen("snthsnth")); // no exception

   double now = time(0);

   std::cout << "Today is " << as::date << now << std::endl
             << "Current time is " << as::time << now << std::endl
             << "The current weekday is " << as::ftime("%A") << now <<


I get warnings about converting from time_t to double (which I rather
expected) and then get basic, double formatted output:

Today is 1.3029e+009
Current time is 1.3029e+009
The current weekday is 1.3029e+009

Boost list run by bdawes at, gregod at, cpdaniel at, john at