Data Structures | |
| class | system_clock |
| System clock. More... | |
| class | steady_clock |
| Steady clock. More... | |
Typedefs | |
| typedef duration < boost::int_least32_t, boost::ratio< 86400 > > | days |
Functions | |
| const system_clock::TimePoint & | getUnixEpoch () |
| Get system_clock::TimePoint representing UNIX time epoch (00:00:00 on Jan 1, 1970) More... | |
| milliseconds | toUnixTimestamp (const system_clock::TimePoint &point) |
| Convert system_clock::TimePoint to UNIX timestamp. More... | |
| system_clock::TimePoint | fromUnixTimestamp (const milliseconds &duration) |
| Convert UNIX timestamp to system_clock::TimePoint. More... | |
| std::string | toIsoString (const system_clock::TimePoint &timePoint) |
| Convert to the ISO string representation of the time (YYYYMMDDTHHMMSS,fffffffff) More... | |
| system_clock::TimePoint | fromIsoString (const std::string &isoString) |
| Convert from the ISO string (YYYYMMDDTHHMMSS,fffffffff) representation to the internal time format. More... | |
| std::string | toString (const system_clock::TimePoint &timePoint, const std::string &format="%Y-%m-%d %H:%M:%S", const std::locale &locale=std::locale("C")) |
| Convert time point to string with specified format. More... | |
| system_clock::TimePoint | fromString (const std::string &formattedTimePoint, const std::string &format="%Y-%m-%d %H:%M:%S", const std::locale &locale=std::locale("C")) |
| Convert from string of specified format into time point. More... | |
| typedef duration<boost::int_least32_t, boost::ratio<86400> > ndn::time::days |
|
inline |
Convert from the ISO string (YYYYMMDDTHHMMSS,fffffffff) representation to the internal time format.
Examples of accepted ISO strings:
|
inline |
Convert from string of specified format into time point.
By default, Y-m-d H:M:S is used, accepting dates like 2014-04-10 22:51:00
| formattedTimePoint | string representing time point |
| format | input output format (default: Y-m-d H:M:S) |
| locale | input locale (default: "C" locale) |
|
inline |
Convert UNIX timestamp to system_clock::TimePoint.
|
inline |
Get system_clock::TimePoint representing UNIX time epoch (00:00:00 on Jan 1, 1970)
|
inline |
Convert to the ISO string representation of the time (YYYYMMDDTHHMMSS,fffffffff)
If timePoint contains doesn't contain fractional seconds the output format is YYYYMMDDTHHMMSS
Examples:
|
inline |
Convert time point to string with specified format.
By default, Y-m-d H:M:S is used, producing dates like 2014-04-10 22:51:00
| timePoint | time point of system_clock |
| format | desired output format (default: Y-m-d H:M:S) |
| locale | desired locale (default: "C" locale) |
|
inline |
Convert system_clock::TimePoint to UNIX timestamp.