File remove_hhdate_dependency.patch of Package dwarfs
From 852f590ef484b5bc341dc96c65fd2663af2ac4f5 Mon Sep 17 00:00:00 2001
From: Filippo Bonazzi <filippo.bonazzi@suse.com>
Date: Fri, 3 Oct 2025 12:40:09 +0200
Subject: [PATCH] Use native C++20 std::chrono instead of date
The date library, provided for example by hhdate, has been adopted in
the C++20 standard into the std::chrono header.
---
src/util.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/util.cpp b/src/util.cpp
index 4b8b0ef0d..d1e1151c4 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -48,8 +48,6 @@
#include <utf8.h>
#endif
-#include <date/date.h>
-
#include <folly/ExceptionString.h>
#include <folly/String.h>
#include <folly/portability/Fcntl.h>
@@ -191,7 +189,7 @@ std::chrono::system_clock::time_point parse_time_point(std::string const& str) {
for (auto const& fmt : formats) {
std::istringstream iss(str);
std::chrono::system_clock::time_point tp;
- date::from_stream(iss, fmt, tp);
+ std::chrono::from_stream(iss, fmt, tp);
if (!iss.fail()) {
iss.peek();
if (iss.eof()) {