I am working with Microsoft Visual Studio 2012 and look at using std::put_time , so I created the following example:
int main() { std::time_t t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); std::locale::global( std::locale("en-GB") ); std::cout << std::put_time( std::localtime( &t ), "%x" ) << std::endl; }
This leads to the following conclusion:
06/25/2013
This is not a date format that I would expect from an en-GB locale. I also tried:
std::cout.imbue( std::locale("en-GB") );
But then again, with the same exit. Is this what I should get for this locale, or am I mistaken somewhere?
Thomas russell
source share