mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[feature/new-tz-handling] Remove function getTimestamp() as we require php 5.3
PHPBB3-9558
This commit is contained in:
@@ -44,24 +44,6 @@ class phpbb_datetime extends DateTime
|
||||
parent::__construct($time, $timezone);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a UNIX timestamp representation of the date time.
|
||||
*
|
||||
* @internal This method is for backwards compatibility with 5.2, hence why it doesn't use our method naming standards.
|
||||
* @return int UNIX timestamp
|
||||
*/
|
||||
public function getTimestamp()
|
||||
{
|
||||
static $compat;
|
||||
|
||||
if (!isset($compat))
|
||||
{
|
||||
$compat = !method_exists('DateTime', 'getTimestamp');
|
||||
}
|
||||
|
||||
return !$compat ? parent::getTimestamp() : (int) parent::format('U');
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the current date time into the specified format
|
||||
*
|
||||
|
Reference in New Issue
Block a user