aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions_user.php7
-rw-r--r--phpBB/includes/ucp/ucp_register.php7
2 files changed, 8 insertions, 6 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
{
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index aee55711b2..ac002a26c2 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -120,7 +120,10 @@ class ucp_register
if ($coppa === false && $config['coppa_enable'])
{
$now = getdate();
- $coppa_birthday = $user->format_date(mktime($now['hours'] + $user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), $user->lang['DATE_FORMAT']);
+ $coppa_birthday = $user->create_datetime()
+ ->setDate($now['year'] - 13, $now['mon'], $now['mday'] - 1)
+ ->setTime(0, 0, 0)
+ ->format($user->lang['DATE_FORMAT'], true);
unset($now);
$template->assign_vars(array(
@@ -163,7 +166,6 @@ class ucp_register
$captcha->init(CONFIRM_REG);
}
- $is_dst = $config['board_dst'];
$timezone = $config['board_timezone'];
$data = array(
@@ -280,7 +282,6 @@ class ucp_register
'user_email' => $data['email'],
'group_id' => (int) $group_id,
'user_timezone' => $data['tz'],
- 'user_dst' => $is_dst,
'user_lang' => $data['lang'],
'user_type' => $user_type,
'user_actkey' => $user_actkey,