diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2012-06-04 23:14:41 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-06-18 15:08:36 +0200 |
commit | 963d4afc2cf5fb2903ed02ada20cdbf0188d57db (patch) | |
tree | b4170150d6a7a0fe42d7c35ece5489d4f7ab328b /phpBB/includes/functions_user.php | |
parent | f9bc8252641ec69983acfc6d392770934b7a37a4 (diff) | |
download | forums-963d4afc2cf5fb2903ed02ada20cdbf0188d57db.tar forums-963d4afc2cf5fb2903ed02ada20cdbf0188d57db.tar.gz forums-963d4afc2cf5fb2903ed02ada20cdbf0188d57db.tar.bz2 forums-963d4afc2cf5fb2903ed02ada20cdbf0188d57db.tar.xz forums-963d4afc2cf5fb2903ed02ada20cdbf0188d57db.zip |
[feature/new-tz-handling] Replace gmmktime() and mktime() with phpbb_datetime
PHPBB3-9558
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 3a77407c20..f235b2be55 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -197,7 +197,6 @@ function user_add($user_row, $cp_data = false) 'user_lastpost_time' => 0, 'user_lastpage' => '', 'user_posts' => 0, - 'user_dst' => (int) $config['board_dst'], 'user_colour' => '', 'user_occ' => '', 'user_interests' => '', @@ -677,8 +676,10 @@ 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)) { - $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); + $ban_end = max($current_time, $user->create_datetime() + ->setDate((int) $ban_other[0], (int) $ban_other[1], (int) $ban_other[2]) + ->setTime(0, 0, 0) + ->getTimestamp() + $user->tz->getOffset(new DateTime('UTC'))); } else { |