aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2010-07-23 18:39:12 +0200
committerAndreas Fischer <bantu@phpbb.com>2010-07-23 18:41:49 +0200
commitaca0e024faeca67ba5927b9f9ec495d5f687850d (patch)
tree102d189de597df321c08feab400c4029fa9fea70
parentfc25fe694afdab683789c9ed962c77558f85796c (diff)
downloadforums-aca0e024faeca67ba5927b9f9ec495d5f687850d.tar
forums-aca0e024faeca67ba5927b9f9ec495d5f687850d.tar.gz
forums-aca0e024faeca67ba5927b9f9ec495d5f687850d.tar.bz2
forums-aca0e024faeca67ba5927b9f9ec495d5f687850d.tar.xz
forums-aca0e024faeca67ba5927b9f9ec495d5f687850d.zip
[ticket/9702] Take user's timezone settings into account when banning Until ->
PHPBB3-9702
-rw-r--r--phpBB/includes/functions_user.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 0b26f28864..d9c7d1f2aa 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -766,7 +766,8 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
if (sizeof($ban_other) == 3 && ((int)$ban_other[0] < 9999) &&
(strlen($ban_other[0]) == 4) && (strlen($ban_other[1]) == 2) && (strlen($ban_other[2]) == 2))
{
- $ban_end = max($current_time, gmmktime(0, 0, 0, (int)$ban_other[1], (int)$ban_other[2], (int)$ban_other[0]));
+ $time_offset = (isset($user->timezone) && isset($user->dst)) ? (int) $user->timezone + (int) $user->dst : 0;
+ $ban_end = max($current_time, gmmktime(0, 0, 0, (int)$ban_other[1], (int)$ban_other[2], (int)$ban_other[0]) - $time_offset);
}
else
{