From 8d5dbfaeec64d27f2c6f266b6df086d3b186edd5 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Sun, 15 Dec 2024 02:39:59 -0600 Subject: [PATCH] Fix datetime format --- cpp/build-packages.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/build-packages.cpp b/cpp/build-packages.cpp index 70768e6..9fe0c45 100644 --- a/cpp/build-packages.cpp +++ b/cpp/build-packages.cpp @@ -382,7 +382,7 @@ int main(int argc, char** argv) { std::tm tm; gmtime_r(&now, &tm); char buf_time[20]; - std::strftime(buf_time, sizeof(buf_time), "%Y-%m-%dT%H:%M:%S", &tm); + std::strftime(buf_time, sizeof(buf_time), "%Y%m%dT%H%M%S", &tm); std::string current_time = buf_time; std::string uuid_part = current_time.substr(0,10); // Adjusted to match timestamp length @@ -498,7 +498,7 @@ int main(int argc, char** argv) { std::tm tm_utc; gmtime_r(&t, &tm_utc); char buf_version[20]; - std::strftime(buf_version, sizeof(buf_version), "%Y-%m-%dT%H:%M:%S", &tm_utc); + std::strftime(buf_version, sizeof(buf_version), "%Y%m%d%H%M%S", &tm_utc); std::string current_date = buf_version; std::string version; if(!epoch.empty()) {