From 0b0ea7dd7c9b32ff0cb8830bd122d88e81415331 Mon Sep 17 00:00:00 2001 From: Pichi1966 <57623859+josett225@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:36:29 +0100 Subject: [PATCH 1/2] Update card.php with gmt --- htdocs/asset/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 9531347d580..9b6e857f8fa 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -132,7 +132,7 @@ if (empty($reshook)) { // Action dispose object if ($action == 'confirm_disposal' && $confirm == 'yes' && $permissiontoadd) { - $object->disposal_date = dol_mktime(12, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear')); // for date without hour, we use gmt + $object->disposal_date = dol_mktime(0, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear'), 'gmt'); // for date without hour, we use gmt $object->disposal_amount_ht = GETPOSTINT('disposal_amount'); $object->fk_disposal_type = GETPOSTINT('fk_disposal_type'); $disposal_invoice_id = GETPOSTINT('disposal_invoice_id'); @@ -273,7 +273,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Disposal $langs->load('bills'); - $disposal_date = dol_mktime(12, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear')); // for date without hour, we use gmt + $disposal_date = dol_mktime(0, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear'), 'gmt'); // for date without hour, we use gmt $disposal_amount = GETPOSTINT('disposal_amount'); $fk_disposal_type = GETPOSTINT('fk_disposal_type'); $disposal_invoice_id = GETPOSTINT('disposal_invoice_id'); From 855b609e43983d23c5c83137e58a65db3f7a033b Mon Sep 17 00:00:00 2001 From: Pichi1966 <57623859+josett225@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:52:04 +0100 Subject: [PATCH 2/2] Update assetdepreciationoptions.class.php --- htdocs/asset/class/assetdepreciationoptions.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/asset/class/assetdepreciationoptions.class.php b/htdocs/asset/class/assetdepreciationoptions.class.php index 33bbb0f28cb..ecd6d276726 100644 --- a/htdocs/asset/class/assetdepreciationoptions.class.php +++ b/htdocs/asset/class/assetdepreciationoptions.class.php @@ -262,7 +262,7 @@ class AssetDepreciationOptions extends CommonObject if (in_array($field_info['type'], array('text', 'html'))) { $value = GETPOST($html_name, 'restricthtml'); } elseif ($field_info['type'] == 'date') { - $value = dol_mktime(12, 0, 0, GETPOSTINT($html_name . 'month'), GETPOSTINT($html_name . 'day'), GETPOSTINT($html_name . 'year')); // for date without hour, we use gmt + $value = dol_mktime(0, 0, 0, GETPOSTINT($html_name . 'month'), GETPOSTINT($html_name . 'day'), GETPOSTINT($html_name . 'year'), 'gmt'); // for date without hour, we use gmt } elseif ($field_info['type'] == 'datetime') { $value = dol_mktime(GETPOSTINT($html_name . 'hour'), GETPOSTINT($html_name . 'min'), GETPOSTINT($html_name . 'sec'), GETPOSTINT($html_name . 'month'), GETPOSTINT($html_name . 'day'), GETPOSTINT($html_name . 'year'), 'tzuserrel'); } elseif ($field_info['type'] == 'duration') {