Changeset 2482 for box/trunk/lib/common/BoxTime.cpp
- Timestamp:
- 29/03/2009 15:08:12 (3 years ago)
- File:
-
- 1 edited
-
box/trunk/lib/common/BoxTime.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/common/BoxTime.cpp
r2203 r2482 54 54 } 55 55 56 std::string FormatTime(box_time_t time, bool showMicros)56 std::string FormatTime(box_time_t time, bool includeDate, bool showMicros) 57 57 { 58 58 std::ostringstream buf; … … 69 69 #endif 70 70 { 71 buf << std::setfill('0') << 72 std::setw(2) << tm_ptr->tm_hour << ":" << 71 buf << std::setfill('0'); 72 73 if (includeDate) 74 { 75 buf << std::setw(4) << (tm_ptr->tm_year + 1900) << "-" << 76 std::setw(2) << (tm_ptr->tm_mon + 1) << "-" << 77 std::setw(2) << (tm_ptr->tm_mday) << " "; 78 } 79 80 buf << std::setw(2) << tm_ptr->tm_hour << ":" << 73 81 std::setw(2) << tm_ptr->tm_min << ":" << 74 82 std::setw(2) << tm_ptr->tm_sec;
Note: See TracChangeset
for help on using the changeset viewer.
