1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[feature/new-tz-handling] Rename $user->tz back to $user->timezone

PHPBB3-9558
This commit is contained in:
Joas Schilling
2012-07-18 16:52:52 +02:00
parent 515e1662a9
commit a71e60cdbd
5 changed files with 13 additions and 13 deletions

View File

@@ -38,7 +38,7 @@ class phpbb_datetime extends DateTime
public function __construct($user, $time = 'now', DateTimeZone $timezone = null)
{
$this->user = $user;
$timezone = $timezone ?: $this->user->tz;
$timezone = $timezone ?: $this->user->timezone;
parent::__construct($time, $timezone);
}
@@ -55,7 +55,7 @@ class phpbb_datetime extends DateTime
$format = $format ? $format : $this->user->date_format;
$format = self::format_cache($format, $this->user);
$relative = ($format['is_short'] && !$force_absolute);
$now = new self($this->user, 'now', $this->user->tz);
$now = new self($this->user, 'now', $this->user->timezone);
$timestamp = $this->getTimestamp();
$now_ts = $now->getTimeStamp();