Let\'s say I have time_t and tm structure. I can\'t use Boost but MFC. How can I make it a string like following?
Mon Apr 23 17:48:14 2012
If you need to worry about formatting on different locales, don't forget to initialize the CRT with the current locale. This affects COleDateTime too.
setlocale(LC_COLLATE,“.OCP”); // sets the sort order
setlocale(LC_MONETARY, “.OCP”); // sets the currency formatting rules
setlocale(LC_NUMERIC, “.OCP”); // sets the formatting of numerals
setlocale(LC_TIME, “.OCP”); // defines the date/time formatting
See my blog post which ties in MSDN articles and other sources. http://gilesey.wordpress.com/2012/12/30/initailizing-mfccrt-for-consumption-of-regional-settings-internationalizationc