From 8df094317d6d77816adc420e1b70777e1e99db4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 13 Feb 2025 13:33:05 +0100 Subject: [PATCH 1/3] fix phpdoc --- htdocs/core/lib/date.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index bcb37f6a685..e61788f3f04 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -115,7 +115,7 @@ function getServerTimeZoneInt($refgmtdate = 'now') /** * Add a delay to a date * - * @param int|string $time Date timestamp (or string with format YYYY-MM-DD) + * @param int $time Date timestamp * @param float $duration_value Value of delay to add * @param string $duration_unit Unit of added delay (d, m, y, w, h, i) * @param int<0,1> $ruleforendofmonth Change the behavior of PHP over data-interval, 0 or 1 From 0524c4ea1058d968dede20f86dceb546258679db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 13 Feb 2025 13:48:43 +0100 Subject: [PATCH 2/3] Update date.lib.php --- htdocs/core/lib/date.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index e61788f3f04..0bb10e69b8a 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -124,7 +124,7 @@ function getServerTimeZoneInt($refgmtdate = 'now') */ function dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth = 0) { - if (empty($duration_value)) { + if (!isDolTms($duration_value)) { return $time; } if ($duration_unit == 's') { From 781bff6e9deb4e28f237d17316456fe177459650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 13 Feb 2025 15:06:01 +0100 Subject: [PATCH 3/3] Update date.lib.php --- htdocs/core/lib/date.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 0bb10e69b8a..e61788f3f04 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -124,7 +124,7 @@ function getServerTimeZoneInt($refgmtdate = 'now') */ function dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth = 0) { - if (!isDolTms($duration_value)) { + if (empty($duration_value)) { return $time; } if ($duration_unit == 's') {