From c828dee3bb96f1b428b7924886d7039d656aa2e9 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Tue, 13 Jun 2023 11:08:01 +0800 Subject: [PATCH] * Modify formatDateDiffFunction. --- lib/dbh/dbh.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dbh/dbh.class.php b/lib/dbh/dbh.class.php index fca82bc20f..1740a98493 100644 --- a/lib/dbh/dbh.class.php +++ b/lib/dbh/dbh.class.php @@ -447,7 +447,7 @@ class dbh */ public function formatDmDateDiffFunction($sql) { - return preg_replace('/DATEDIFF\(/', 'DATEDIFF(DD,', $sql); + return preg_replace('/DATEDIFF\(([^,]+),([^)]+)\)/', 'DATEDIFF(DD,$1,$2)', $sql); } /**