Merge pull request #20541 from FHenry/14.0_fix_bithday_date_displayed
fix: Bad dirthday displayed date (d-1) in the Bithday Widget
This commit is contained in:
commit
d26c578e97
@ -119,7 +119,7 @@ class box_birthdays extends ModeleBoxes
|
|||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'class="center nowraponall"',
|
'td' => 'class="center nowraponall"',
|
||||||
'text' => dol_print_date($dateb, "day", 'gmt').' - '.$age.' '.$langs->trans('DurationYears')
|
'text' => dol_print_date($dateb, "day", 'tzserver').' - '.$age.' '.$langs->trans('DurationYears')
|
||||||
);
|
);
|
||||||
|
|
||||||
/*$this->info_box_contents[$line][] = array(
|
/*$this->info_box_contents[$line][] = array(
|
||||||
|
|||||||
@ -1255,7 +1255,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||||||
// Date birth
|
// Date birth
|
||||||
print '<tr><td>'.$langs->trans("DateOfBirth").'</td>';
|
print '<tr><td>'.$langs->trans("DateOfBirth").'</td>';
|
||||||
print '<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 '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -1565,7 +1565,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||||||
// Date of birth
|
// Date of birth
|
||||||
print '<tr><td>'.$langs->trans("DateOfBirth").'</td>';
|
print '<tr><td>'.$langs->trans("DateOfBirth").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print dol_print_date($object->birth, 'day');
|
print dol_print_date($object->birth, 'day', 'tzserver');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -2712,9 +2712,9 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||||||
print '<tr><td>'.$langs->trans("DateOfBirth").'</td>';
|
print '<tr><td>'.$langs->trans("DateOfBirth").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($caneditfield) {
|
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 {
|
} else {
|
||||||
print dol_print_date($object->birth, 'day');
|
print dol_print_date($object->birth, 'day', 'tzserver');
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -1731,7 +1731,7 @@ class User extends CommonObject
|
|||||||
$sql .= ", login = '".$this->db->escape($this->login)."'";
|
$sql .= ", login = '".$this->db->escape($this->login)."'";
|
||||||
$sql .= ", api_key = ".($this->api_key ? "'".$this->db->escape($this->api_key)."'" : "null");
|
$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 .= ", 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)) {
|
if (!empty($user->admin)) {
|
||||||
$sql .= ", admin = ".(int) $this->admin; // admin flag can be set/unset only by an admin user
|
$sql .= ", admin = ".(int) $this->admin; // admin flag can be set/unset only by an admin user
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user