#include <fmt/chrono.h>
int main() {
auto tpNow = std::chrono::time_point_cast<std::chrono::milliseconds>(std::chrono::system_clock::now());
fmt::print("{:%Y-%m-%d} {:%H:%M:%S}\n", tpNow, tpNow.time_since_epoch());
fmt::print("{:%Y-%m-%d %H:%M:}{:%S}\n", tpNow, tpNow.time_since_epoch());
}
fmt格式化毫秒备忘
最新推荐文章于 2024-12-20 23:58:03 发布