From 3bedbec81bd20ae079d80f2966fcab9c6decc14e Mon Sep 17 00:00:00 2001 From: javieralapps4up Date: Thu, 15 Sep 2022 18:02:24 +0200 Subject: [PATCH] Update date.lib.php If $duration_unit = 's', it shows a 500 error --- htdocs/core/lib/date.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index d2383a14dfc..ac93441d69e 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -121,7 +121,9 @@ function getServerTimeZoneInt($refgmtdate = 'now') function dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth = 0) { global $conf; - + if ($duration_unit == 's') { + return $time + ($duration_value); + } if ($duration_value == 0) { return $time; }