diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 398d5b62adc..85c22a535bd 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -825,7 +825,7 @@ while ($i < min($num, $limit)) if (! empty($arrayfields['d.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -833,7 +833,7 @@ while ($i < min($num, $limit)) if (! empty($arrayfields['d.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 0f2fd46c3f6..5e893a3ab44 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -866,7 +866,7 @@ if ($resql) if (! empty($arrayfields['p.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -874,7 +874,7 @@ if ($resql) if (! empty($arrayfields['p.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 72f2ac61213..49386538468 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1307,7 +1307,7 @@ if ($resql) if (! empty($arrayfields['c.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -1315,7 +1315,7 @@ if ($resql) if (! empty($arrayfields['c.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 1f22bf31523..a7cc2f9e719 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1157,7 +1157,7 @@ if ($resql) if (! empty($arrayfields['f.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -1165,7 +1165,7 @@ if ($resql) if (! empty($arrayfields['f.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 05fcf3e0916..ac953d802de 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -821,7 +821,7 @@ while ($i < min($num,$limit)) if (! empty($arrayfields['p.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -829,7 +829,7 @@ while ($i < min($num,$limit)) if (! empty($arrayfields['p.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index dfc00f95e11..d32986cbeeb 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -795,7 +795,7 @@ if ($resql) if (! empty($arrayfields['c.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -803,7 +803,7 @@ if ($resql) if (! empty($arrayfields['c.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 945b5b8b983..d39c61e397c 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -720,7 +720,7 @@ while ($i < min($num,$limit)) if (! empty($arrayfields['cd.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -728,7 +728,7 @@ while ($i < min($num,$limit)) if (! empty($arrayfields['cd.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 4cdff0bd38c..2c1427c87f5 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -625,7 +625,7 @@ if ($resql) if (! empty($arrayfields['e.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -633,7 +633,7 @@ if ($resql) if (! empty($arrayfields['e.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index c483dae647f..ef97d487298 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -558,7 +558,7 @@ if ($resql) if (! empty($arrayfields['f.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -566,7 +566,7 @@ if ($resql) if (! empty($arrayfields['f.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index ce95cfc7ebf..3894cf28cc4 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -1180,7 +1180,7 @@ if ($resql) if (! empty($arrayfields['cf.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -1188,7 +1188,7 @@ if ($resql) if (! empty($arrayfields['cf.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 9d6c5e4ccd3..e74a3b4df8e 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1074,7 +1074,7 @@ if ($resql) if (! empty($arrayfields['f.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -1082,7 +1082,7 @@ if ($resql) if (! empty($arrayfields['f.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index b6c2f86e13f..4c314661959 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -504,7 +504,7 @@ while ($i < min($num, $limit)) print ''; foreach($object->fields as $key => $val) { - if (in_array($key, array('date_creation', 'tms', 'import_key', 'status'))) continue; + if (in_array($key, array('date_creation', 'tms', 'import_key', 'status'))) continue; // Discard some field output at end $align=''; if (in_array($val['type'], array('date','datetime','timestamp'))) $align='center'; if (in_array($val['type'], array('timestamp'))) $align.='nowrap'; @@ -512,7 +512,8 @@ while ($i < min($num, $limit)) if (! empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (in_array($val['type'], array('date','datetime','timestamp'))) print dol_print_date($db->jdate($obj->$key), 'dayhour'); + if (in_array($val['type'], array('date'))) print dol_print_date($db->jdate($obj->$key), 'day', 'tzuser'); + elseif (in_array($val['type'], array('datetime','timestamp'))) print dol_print_date($db->jdate($obj->$key), 'dayhour', 'tzuser'); elseif ($key == 'ref') print $object->getNomUrl(1, '', 0, '', 1); elseif ($key == 'status') print $object->getLibStatut(3); else print $obj->$key; @@ -555,7 +556,7 @@ while ($i < min($num, $limit)) // Rest of fields foreach($object->fields as $key => $val) { - if (! in_array($key, array('date_creation', 'tms', 'import_key', 'status'))) continue; + if (! in_array($key, array('date_creation', 'tms', 'import_key', 'status'))) continue; // Keep only field not yet already output $align=''; if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center'; if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap'; @@ -563,7 +564,8 @@ while ($i < min($num, $limit)) if (! empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (in_array($val['type'], array('date','datetime','timestamp'))) print dol_print_date($db->jdate($obj->$key), 'dayhour'); + if (in_array($val['type'], array('date'))) print dol_print_date($db->jdate($obj->$key), 'day', 'tzuser'); + elseif (in_array($val['type'], array('datetime','timestamp'))) print dol_print_date($db->jdate($obj->$key), 'dayhour', 'tzuser'); elseif ($key == 'status') print $object->getLibStatut(3); else print $obj->$key; print ''; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index df3a04d3233..525bd96ed90 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -963,7 +963,7 @@ else if (! empty($arrayfields['p.datec']['checked'])) { print ''; - print dol_print_date($obj->date_creation, 'dayhour'); + print dol_print_date($obj->date_creation, 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -971,7 +971,7 @@ else if (! empty($arrayfields['p.tms']['checked'])) { print ''; - print dol_print_date($obj->date_update, 'dayhour'); + print dol_print_date($obj->date_update, 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 6c282f12101..7d236c904f5 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -527,7 +527,7 @@ if ($resql) if (! empty($arrayfields['t.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -535,7 +535,7 @@ if ($resql) if (! empty($arrayfields['t.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index f2da27ea56f..ccc2c12584e 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -816,7 +816,7 @@ while ($i < min($num,$limit)) if (! empty($arrayfields['t.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -824,7 +824,7 @@ while ($i < min($num,$limit)) if (! empty($arrayfields['t.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 4f8b5513016..f9e10667ccd 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1261,7 +1261,7 @@ while ($i < min($num, $limit)) if (! empty($arrayfields['s.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -1269,7 +1269,7 @@ while ($i < min($num, $limit)) if (! empty($arrayfields['s.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 013ad832898..9b345827a8e 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -853,7 +853,7 @@ if ($resql) if (! empty($arrayfields['sp.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -861,7 +861,7 @@ if ($resql) if (! empty($arrayfields['sp.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 91fe86517c6..15571755944 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -644,7 +644,7 @@ while ($i < min($num,$limit)) if (! empty($arrayfields['u.datec']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; } @@ -652,7 +652,7 @@ while ($i < min($num,$limit)) if (! empty($arrayfields['u.tms']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; }