mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 06:20:46 +02:00
Merge branch 'feature/new-tz-handling' of https://github.com/p/phpbb3 into feature/new-tz-handling
Conflicts: phpBB/includes/functions_profile_fields.php phpBB/includes/session.php phpBB/install/database_update.php
This commit is contained in:
@@ -554,9 +554,12 @@ class custom_profile
|
||||
else if ($day && $month && $year)
|
||||
{
|
||||
global $user;
|
||||
// Date should display as the same date for every user regardless of timezone, so remove offset
|
||||
// to compensate for the offset added by phpbb_user::format_date()
|
||||
return $user->format_date(gmmktime(0, 0, 0, $month, $day, $year) - ($user->timezone + $user->dst), $user->lang['DATE_FORMAT'], true);
|
||||
// Date should display as the same date for every user regardless of timezone
|
||||
|
||||
return $user->create_datetime()
|
||||
->setDate($year, $month, $day)
|
||||
->setTime(0, 0, 0)
|
||||
->format($user->lang['DATE_FORMAT'], true);
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
Reference in New Issue
Block a user