fix date filters

Wed, 19 Feb 2025 18:32:17 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 19 Feb 2025 18:32:17 +0100
changeset 36
e223879aa02a
parent 35
d75805c1e3b9
child 37
d7e9a1200e21

fix date filters

fixes #599

src/main.cpp file | annotate | diff | comparison | revisions
--- a/src/main.cpp	Wed Feb 19 18:14:12 2025 +0100
+++ b/src/main.cpp	Wed Feb 19 18:32:17 2025 +0100
@@ -241,7 +241,7 @@
         if (repo.type == fm::HG) {
             proc.setbin(settings.hg);
             if (proc.exec_log({"log",
-                "--date", std::format("{0}-01-01 to {0}-12-31", report_year),
+                "--date", std::format("{0}-01-01 00:00:00 to {0}-12-31 23:59:59", report_year),
                 "--template", "{author}#{date|shortdate}\n"})) {
                 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str());
                 return EXIT_FAILURE;
@@ -250,8 +250,8 @@
         } else {
             proc.setbin(settings.git);
             if (proc.exec_log({"log",
-                "--since", std::format("{0}-01-01", report_year),
-                "--until", std::format("{0}-12-31", report_year),
+                "--since", std::format("{0}-01-01 00:00:00", report_year),
+                "--until", std::format("{0}-12-31 23:59:59", report_year),
                 "--format=tformat:%an <%ae>#%cs"})) {
                 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str());
                 return EXIT_FAILURE;

mercurial