mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'ticket/cs278/7369' into develop-olympus
* ticket/cs278/7369: [ticket/7369] CPF date should always render the users selection.
This commit is contained in:
commit
098ff47602
1 changed files with 3 additions and 2 deletions
|
@ -543,8 +543,9 @@ class custom_profile
|
||||||
else if ($day && $month && $year)
|
else if ($day && $month && $year)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
// d/m/y 00:00 GMT isn't necessarily on the same d/m/y in the user's timezone, so add the timezone seconds
|
// Date should display as the same date for every user regardless of timezone, so remove offset
|
||||||
return $user->format_date(gmmktime(0, 0, 0, $month, $day, $year) + $user->timezone + $user->dst, $user->lang['DATE_FORMAT'], true);
|
// to compensate for the offset added by user::format_date()
|
||||||
|
return $user->format_date(gmmktime(0, 0, 0, $month, $day, $year) - ($user->timezone + $user->dst), $user->lang['DATE_FORMAT'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
|
Loading…
Add table
Reference in a new issue