57 auto now = std::chrono::system_clock::now();
58 auto in_time_t = std::chrono::system_clock::to_time_t(now);
59 #if !defined(__clang__) && __GNUC__ < 5 61 strftime(buffer,
sizeof(buffer),
"%Y-%m-%dT%H:%M:%S", std::localtime(&in_time_t));
62 return std::string(buffer);
65 ss << std::put_time(std::localtime(&in_time_t),
"%Y-%m-%dT%H:%M:%S");
TimeStamp()
Empty constructor: timestamp is set to 01-01-1970 00.00.
friend std::ostream & operator<<(std::ostream &os, const TimeStamp ×tamp)
Friend definition of the << operator.
static std::string GetCurrentTimeStamp()
Return a timestamp of the current time.
This file collects some utility functions and macros.
friend bool operator<=(const TimeStamp ×tamp1, const TimeStamp ×tamp2)
The type used for timestamp.