tweak generator info and use local time stamp for better readability

This commit is contained in:
SoftFever 2023-03-14 22:12:33 +08:00
parent f914a36a7f
commit 2895477da4
4 changed files with 15 additions and 10 deletions

View file

@ -32,6 +32,10 @@ inline std::string utc_timestamp()
return utc_timestamp(get_current_time_utc());
}
inline std::string local_timestamp() {
return time2str(get_current_time_utc(), TimeZone::local, TimeFormat::gcode);
}
// String to time_t function. Returns time_t(-1) if fails to parse the input.
time_t str2time(const std::string &str, TimeZone zone, TimeFormat fmt);