try with tzserver

This commit is contained in:
Florian HENRY 2022-04-06 14:09:44 +02:00
parent 7b36733690
commit 798c7a8a0b
3 changed files with 6 additions and 6 deletions

View File

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

View File

@ -1255,7 +1255,7 @@ if ($action == 'create' || $action == 'adduserldap') {
// Date birth
print '<tr><td>'.$langs->trans("DateOfBirth").'</td>';
print '<td>';
print $form->selectDate($dateofbirth, 'dateofbirth', 0, 0, 1, 'createuser', 1, 0);
print $form->selectDate($dateofbirth, 'dateofbirth', 0, 0, 1, 'createuser', 1, 0, 0, '', 0, '', '', 1, '', '', 'tzserver');
print '</td>';
print "</tr>\n";
@ -1565,7 +1565,7 @@ if ($action == 'create' || $action == 'adduserldap') {
// Date of birth
print '<tr><td>'.$langs->trans("DateOfBirth").'</td>';
print '<td>';
print dol_print_date($object->birth, 'day');
print dol_print_date($object->birth, 'day', 'tzserver');
print '</td>';
print "</tr>\n";
@ -2712,9 +2712,9 @@ if ($action == 'create' || $action == 'adduserldap') {
print '<tr><td>'.$langs->trans("DateOfBirth").'</td>';
print '<td>';
if ($caneditfield) {
echo $form->selectDate($dateofbirth ? $dateofbirth : $object->birth, 'dateofbirth', 0, 0, 1, 'updateuser', 1, 0);
echo $form->selectDate($dateofbirth ? $dateofbirth : $object->birth, 'dateofbirth', 0, 0, 1, 'updateuser', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver');
} else {
print dol_print_date($object->birth, 'day');
print dol_print_date($object->birth, 'day', 'tzserver');
}
print '</td>';
print "</tr>\n";

View File

@ -1731,7 +1731,7 @@ class User extends CommonObject
$sql .= ", login = '".$this->db->escape($this->login)."'";
$sql .= ", api_key = ".($this->api_key ? "'".$this->db->escape($this->api_key)."'" : "null");
$sql .= ", gender = ".($this->gender != -1 ? "'".$this->db->escape($this->gender)."'" : "null"); // 'man' or 'woman'
$sql .= ", birth=".(strval($this->birth) != '' ? "'".$this->db->idate($this->birth)."'" : 'null');
$sql .= ", birth=".(strval($this->birth) != '' ? "'".$this->db->idate($this->birth, 'tzserver')."'" : 'null');
if (!empty($user->admin)) {
$sql .= ", admin = ".(int) $this->admin; // admin flag can be set/unset only by an admin user
}