mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/new-tz-handling] Renamed old variables and removed extra conditional.
PHPBB3-9558
This commit is contained in:
parent
e8b60fc3d8
commit
a5c3ff3769
1 changed files with 17 additions and 22 deletions
|
@ -88,21 +88,17 @@ class phpbb_datetime extends DateTime
|
||||||
$midnight->setTime(0, 0, 0);
|
$midnight->setTime(0, 0, 0);
|
||||||
|
|
||||||
$midnight = $midnight->getTimestamp();
|
$midnight = $midnight->getTimestamp();
|
||||||
$gmepoch = $this->getTimestamp();
|
$timestamp = $this->getTimestamp();
|
||||||
|
|
||||||
if (!($gmepoch < $midnight - 86400 || $gmepoch > $midnight + 172800))
|
if ($timestamp > $midnight + 86400)
|
||||||
{
|
|
||||||
$day = false;
|
|
||||||
|
|
||||||
if ($gmepoch > $midnight + 86400)
|
|
||||||
{
|
{
|
||||||
$day = 'TOMORROW';
|
$day = 'TOMORROW';
|
||||||
}
|
}
|
||||||
else if ($gmepoch > $midnight)
|
else if ($timestamp > $midnight)
|
||||||
{
|
{
|
||||||
$day = 'TODAY';
|
$day = 'TODAY';
|
||||||
}
|
}
|
||||||
else if ($gmepoch > $midnight - 86400)
|
else if ($timestamp > $midnight - 86400)
|
||||||
{
|
{
|
||||||
$day = 'YESTERDAY';
|
$day = 'YESTERDAY';
|
||||||
}
|
}
|
||||||
|
@ -115,7 +111,6 @@ class phpbb_datetime extends DateTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$format = self::_format_cache($format, $this->_user);
|
$format = self::_format_cache($format, $this->_user);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue