Function get_build_time#

Function Documentation#

inline std::string get_build_time()#

returns the time that the running executable was built

This uses the mtime of the running binary, which is when it was linked. That is more accurate than BUILD_DATE and BUILD_TIME, which are per-translation-unit and go stale whenever a header or a linked library changes without the main source being rebuilt.

Returns:

build time as YYYY-MM-DDThh:mm:ss UTC, empty if unavailable