/* * Copyright (C) 2015-present ScyllaDB */ /* * SPDX-License-Identifier: AGPL-3.0-or-later */ #include #include "db_clock.hh" #include "timestamp.hh" #include "clocks-impl.hh" std::atomic clocks_offset; std::string format_timestamp(api::timestamp_type ts) { auto t = std::time_t(std::chrono::duration_cast(api::timestamp_clock::duration(ts)).count()); ::tm t_buf; return format("{}", std::put_time(::gmtime_r(&t, &t_buf), "%Y/%m/%d %T")); }