From 33ab3d4439773cca96e40c707f302b193c22edf9 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 6 Mar 2008 19:29:59 +0000 Subject: [PATCH] Custom profile fields with date type should be timezone independend [Bug #15003] git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8424 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/functions_profile_fields.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index d75b841962..9c7a3fb7cf 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -131,6 +131,7 @@
  • [Change] Added sanity checks to various ACP settings
  • [Change] Removed minimum form times
  • [Fix] Check topics_per_page value in acp_forums (Bug #15539)
  • +
  • [Fix] Custom profile fields with date type should be timezone independend (Bug #15003)
  • 1.i. Changes since 3.0.RC8

    diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 3797166429..b621095df4 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -488,7 +488,8 @@ class custom_profile else if ($day && $month && $year) { global $user; - return $user->format_date(mktime(0, 0, 0, $month, $day, $year), $user->lang['DATE_FORMAT'], true); + // 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); } return $value;