Fix timezone into widgets

This commit is contained in:
Laurent Destailleur 2021-05-25 00:29:32 +02:00
parent dd48c3ee9d
commit 97154f8267
33 changed files with 50 additions and 50 deletions

View File

@ -116,7 +116,7 @@ class box_accountancy_last_manual_entries extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'td' => 'class="center nowraponall"',
'text' => dol_print_date($date, 'day'),
'asis' => 1,
);

View File

@ -161,8 +161,8 @@ class box_actions extends ModeleBoxes
);
$this->info_box_contents[$line][2] = array(
'td' => 'class="nowrap left"',
'text' => dol_print_date($datelimite, "dayhour"),
'td' => 'class="center nowraponall"',
'text' => dol_print_date($datelimite, "dayhour", 'tzuserrel'),
'asis' => 1
);

View File

@ -118,8 +118,8 @@ class box_birthdays extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($dateb, "day").' - '.$age.' '.$langs->trans('DurationYears')
'td' => 'class="center nowraponall"',
'text' => dol_print_date($dateb, "day", 'gmt').' - '.$age.' '.$langs->trans('DurationYears')
);
/*$this->info_box_contents[$line][] = array(

View File

@ -115,8 +115,8 @@ class box_birthdays_members extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($dateb, "day").' - '.$age.' '.$langs->trans('DurationYears')
'td' => 'class="center nowraponall"',
'text' => dol_print_date($dateb, "day", 'gmt').' - '.$age.' '.$langs->trans('DurationYears')
);
/*$this->info_box_contents[$line][] = array(

View File

@ -143,7 +143,7 @@ class box_boms extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datem, 'day'),
'text' => dol_print_date($datem, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -134,8 +134,8 @@ class box_clients extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datem, "day")
'td' => 'class="center nowraponall"',
'text' => dol_print_date($datem, "day", 'tzuserrel')
);
$this->info_box_contents[$line][] = array(

View File

@ -180,7 +180,7 @@ class box_commandes extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($date, 'day'),
'text' => dol_print_date($date, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -161,7 +161,7 @@ class box_contacts extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datem, "day"),
'text' => dol_print_date($datem, "day", 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -156,7 +156,7 @@ class box_contracts extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datec, 'day'),
'text' => dol_print_date($datec, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -150,7 +150,7 @@ class box_external_rss extends ModeleBoxes
//$item['atom_content']
}
if (is_numeric($date)) {
$date = dol_print_date($date, "dayhour");
$date = dol_print_date($date, "dayhour", 'tzuserrel');
}
$isutf8 = utf8_check($title);

View File

@ -163,7 +163,7 @@ class box_factures extends ModeleBoxes
$late = '';
if ($facturestatic->hasDelay()) {
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day')));
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day', 'tzuserrel')));
}
$this->info_box_contents[$line][] = array(
@ -186,7 +186,7 @@ class box_factures extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($date, 'day'),
'text' => dol_print_date($date, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -159,7 +159,7 @@ class box_factures_fourn extends ModeleBoxes
$late = '';
if ($facturestatic->hasDelay()) {
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day')));
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day', 'tzuserrel')));
}
$this->info_box_contents[$line][] = array(
@ -189,7 +189,7 @@ class box_factures_fourn extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($date, 'day'),
'text' => dol_print_date($date, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -150,7 +150,7 @@ class box_factures_fourn_imp extends ModeleBoxes
$late = '';
if ($facturestatic->hasDelay()) {
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day')));
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day', 'tzuserrel')));
}
$tooltip = $langs->trans('SupplierInvoice').': '.($objp->ref ? $objp->ref : $objp->facid).'<br>'.$langs->trans('RefSupplier').': '.$objp->ref_supplier;
@ -175,7 +175,7 @@ class box_factures_fourn_imp extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datelimite, 'day'),
'text' => dol_print_date($datelimite, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -165,7 +165,7 @@ class box_factures_imp extends ModeleBoxes
$late = '';
if ($facturestatic->hasDelay()) {
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day')));
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day', 'tzuserrel')));
}
$this->info_box_contents[$line][] = array(
@ -188,7 +188,7 @@ class box_factures_imp extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datelimite, 'day'),
'text' => dol_print_date($datelimite, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -145,7 +145,7 @@ class box_ficheinter extends ModeleBoxes
$this->info_box_contents[$i][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datec, 'day'),
'text' => dol_print_date($datec, 'day', 'tzuserrel'),
);
$this->info_box_contents[$i][] = array(

View File

@ -128,8 +128,8 @@ class box_fournisseurs extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datem, "day"),
'td' => 'class="center nowraponall"',
'text' => dol_print_date($datem, "day", 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -126,8 +126,8 @@ class box_goodcustomers extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datem, "day")
'td' => 'class="center nowraponall"',
'text' => dol_print_date($datem, "day", 'tzuserrel')
);
$this->info_box_contents[$line][] = array(

View File

@ -162,7 +162,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Date creation
$this->info_box_contents[$i][$r] = array(
'td' => 'class="right"',
'text' => dol_print_date($datec, 'dayhour')
'text' => dol_print_date($datec, 'dayhour', 'tzuserrel')
);
$r++;

View File

@ -166,7 +166,7 @@ class box_last_ticket extends ModeleBoxes
// Date creation
$this->info_box_contents[$i][$r] = array(
'td' => 'class="right"',
'text' => dol_print_date($datec, 'dayhour'),
'text' => dol_print_date($datec, 'dayhour', 'tzuserrel'),
);
$r++;

View File

@ -93,7 +93,7 @@ class box_lastlogin extends ModeleBoxes
'text' => $langs->trans("PreviousConnexion"),
);
if ($user->datepreviouslogin) {
$tmp = dol_print_date($user->datepreviouslogin, "dayhour", 'tzuser');
$tmp = dol_print_date($user->datepreviouslogin, "dayhour", 'tzuserrel');
} else {
$tmp = $langs->trans("Unknown");
}

View File

@ -145,8 +145,8 @@ class box_members extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datem, "day"),
'td' => 'class="center nowraponall"',
'text' => dol_print_date($datem, "day", 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -147,8 +147,8 @@ class box_members_last_modified extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datem, "day"),
'td' => 'class="center nowraponall"',
'text' => dol_print_date($datem, "day", 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -158,7 +158,7 @@ class box_members_last_subscriptions extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right tdoverflowmax150 maxwidth150onsmartphone"',
'text' => dol_print_date($this->db->jdate($obj->datem ? $obj->datem : $obj->datec), 'dayhour'),
'text' => dol_print_date($this->db->jdate($obj->datem ? $obj->datem : $obj->datec), 'dayhour', 'tzuserrel'),
);
$line++;

View File

@ -111,7 +111,7 @@ class box_members_subscriptions_by_year extends ModeleBoxes
$i = 0;
while ($i < $num) {
$objp = $this->db->fetch_object($result);
$year = dol_print_date($this->db->jdate($objp->dateh), "%Y");
$year = dol_print_date($this->db->jdate($objp->dateh), "%Y", 'gmt');
$Total[$year] = (isset($Total[$year]) ? $Total[$year] : 0) + $objp->subscription;
$Number[$year] = (isset($Number[$year]) ? $Number[$year] : 0) + 1;
$tot += $objp->subscription;

View File

@ -138,8 +138,8 @@ class box_mos extends ModeleBoxes
}
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datem, 'day'),
'td' => 'class="center nowraponall"',
'text' => dol_print_date($datem, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -190,8 +190,8 @@ class box_produits extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datem, 'day'),
'td' => 'class="center nowraponall"',
'text' => dol_print_date($datem, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -165,8 +165,8 @@ class box_propales extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($date, 'day'),
'td' => 'class="center nowraponall"',
'text' => dol_print_date($date, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -135,8 +135,8 @@ class box_prospect extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($datem, "day"),
'td' => 'class="center nowraponall"',
'text' => dol_print_date($datem, "day", 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -156,7 +156,7 @@ class box_scheduled_jobs extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'textnoformat' => (empty($resultarray[$line][2]) ? '' : $form->textwithpicto(dol_print_date($resultarray[$line][2], "dayhoursec"), $langs->trans("CurrentTimeZone")))
'textnoformat' => (empty($resultarray[$line][2]) ? '' : $form->textwithpicto(dol_print_date($resultarray[$line][2], "dayhoursec", 'tzserver'), $langs->trans("CurrentTimeZone")))
);
$this->info_box_contents[$line][] = array(
'td' => 'class="center" ',

View File

@ -200,8 +200,8 @@ class box_services_contracts extends ModeleBoxes
);
$this->info_box_contents[$i][] = array(
'td' => '',
'text' => dol_print_date($datem, 'day'),
'td' => 'class="center nowraponall"',
'text' => dol_print_date($datem, 'day', 'tzuserrel'),
'text2'=> $late,
);

View File

@ -152,7 +152,7 @@ class box_services_expired extends ModeleBoxes
$this->info_box_contents[$i][] = array(
'td' => 'class="center nowraponall"',
'text' => dol_print_date($dateline, 'day'),
'text' => dol_print_date($dateline, 'day', 'tzuserrel'),
'text2'=> $late,
);

View File

@ -153,7 +153,7 @@ class box_supplier_orders extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => dol_print_date($date, 'day'),
'text' => dol_print_date($date, 'day', 'tzuserrel'),
);
$this->info_box_contents[$line][] = array(

View File

@ -161,7 +161,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => $delayIcon.'<span class="classfortooltip" title="'.$langs->trans('DateDeliveryPlanned').'"><i class="fa fa-dolly" ></i> '.dol_print_date($delivery_date, 'day').'</span>',
'text' => $delayIcon.'<span class="classfortooltip" title="'.$langs->trans('DateDeliveryPlanned').'"><i class="fa fa-dolly" ></i> '.dol_print_date($delivery_date, 'day', 'tzuserrel').'</span>',
'asis' => 1
);