任何人都知道如何從當前時間提升到本地系統獲得簡單的日期格式?現在提高簡單的人類可讀日期時間
boost::posix_time::ptime now = boost::posix_time::second_clock::universal_time();
boost::posix_time::time_facet *facet = new boost::posix_time::time_facet("%d-%m-%Y %H:%M:%S");
我見過使用cout.imbue的例子,但我只想要一個簡單的字符串。
這是不特定的本地計算機...我需要提高::了posix_time ::現在的ptime =的boost ::了posix_time :: second_clock :: LOCAL_TIME(); – Bluebaron
其他一切都很好。 – Bluebaron
不會創建新的方面並在每次調用此函數時灌注它會導致大量開銷? – rve