diff options
author | Chris Smith <toonarmy@phpbb.com> | 2010-08-23 06:24:13 +0100 |
---|---|---|
committer | Chris Smith <toonarmy@phpbb.com> | 2010-08-23 06:24:13 +0100 |
commit | 50c6af0216d81b1bbc591e8af768799f1dee48d2 (patch) | |
tree | e54c48f7b8f7789b93439ba2e5e7e1eb07d7305d /phpBB/includes | |
parent | e4a1f08364c29693680c01f14cbd46e5d48ee972 (diff) | |
download | forums-50c6af0216d81b1bbc591e8af768799f1dee48d2.tar forums-50c6af0216d81b1bbc591e8af768799f1dee48d2.tar.gz forums-50c6af0216d81b1bbc591e8af768799f1dee48d2.tar.bz2 forums-50c6af0216d81b1bbc591e8af768799f1dee48d2.tar.xz forums-50c6af0216d81b1bbc591e8af768799f1dee48d2.zip |
[ticket/7369] CPF date should always render the users selection.
CPF render code was incorrectly adding the users timezone offset instead
of removing it to compensate for the addition made in user::format_date().
PHPBB3-7369
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_profile_fields.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index fa1cc98e10..3937cf9c21 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -543,8 +543,9 @@ class custom_profile else if ($day && $month && $year) { 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 - 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, so remove offset + // 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; |