core::string CTime::ToString(const CTime& time, bool _24Format, bool seconds) { std::stringstream stream; stream << std::setfill('0') << std::setw(2) << time.GetHour(_24Format); stream << mT(":") << std::setfill('0') << std::setw(2) << time.GetMinute(); if(seconds) stream << mT(":") << std::setfill('0') << std::setw(2) << time.GetSecond(); if (!_24Format) stream << "-" << (time.IsAM() ? "AM" : "PM"); return stream.str(); }