aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_profile_fields.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2010-08-28 23:25:21 +0200
committerAndreas Fischer <bantu@phpbb.com>2010-08-28 23:25:21 +0200
commit098ff476023609fa0e53fba132d6bbda6ceee3bd (patch)
tree508ab0708dbce5a4cc9f36c94156c7432aaf8e7a /phpBB/includes/functions_profile_fields.php
parent250c04c8d5f7e7ee142bcdd2992abbc37b00654c (diff)
parent50c6af0216d81b1bbc591e8af768799f1dee48d2 (diff)
downloadforums-098ff476023609fa0e53fba132d6bbda6ceee3bd.tar
forums-098ff476023609fa0e53fba132d6bbda6ceee3bd.tar.gz
forums-098ff476023609fa0e53fba132d6bbda6ceee3bd.tar.bz2
forums-098ff476023609fa0e53fba132d6bbda6ceee3bd.tar.xz
forums-098ff476023609fa0e53fba132d6bbda6ceee3bd.zip
Merge branch 'ticket/cs278/7369' into develop-olympus
* ticket/cs278/7369: [ticket/7369] CPF date should always render the users selection.
Diffstat (limited to 'phpBB/includes/functions_profile_fields.php')
-rw-r--r--phpBB/includes/functions_profile_fields.php5
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;