diff options
Diffstat (limited to 'host/commands/cvd/selector/instance_database_types.cpp')
-rw-r--r-- | host/commands/cvd/selector/instance_database_types.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/host/commands/cvd/selector/instance_database_types.cpp b/host/commands/cvd/selector/instance_database_types.cpp index 13d9a8617..bb7920e23 100644 --- a/host/commands/cvd/selector/instance_database_types.cpp +++ b/host/commands/cvd/selector/instance_database_types.cpp @@ -16,8 +16,6 @@ #include "host/commands/cvd/selector/instance_database_types.h" -#include <ctime> - #include <android-base/parseint.h> #include <fmt/core.h> @@ -59,12 +57,7 @@ Result<TimeStamp> DeserializeTimePoint(const Json::Value& group_json) { } std::string Format(const TimeStamp& time_point) { - time_t time = std::chrono::system_clock::to_time_t(time_point); - std::string ctime_str = std::ctime(&time); - if (!ctime_str.empty() && (*ctime_str.rbegin() == '\n')) { - ctime_str.pop_back(); - } - return ctime_str; + return fmt::format("{:%b-%d-%Y %H:%M:%S}", time_point); } } // namespace selector |