aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/datetime.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2013-09-10 14:01:09 +0200
committerNils Adermann <naderman@naderman.de>2013-09-16 00:25:27 +0200
commitb95fdacdd378877d277e261465da73deb06e50da (patch)
tree01d55340b37f412cecd2d898c302e101b8a0ed19 /phpBB/phpbb/datetime.php
parent196e1813cd37c47965eb6f254ce6a55210a1b751 (diff)
downloadforums-b95fdacdd378877d277e261465da73deb06e50da.tar
forums-b95fdacdd378877d277e261465da73deb06e50da.tar.gz
forums-b95fdacdd378877d277e261465da73deb06e50da.tar.bz2
forums-b95fdacdd378877d277e261465da73deb06e50da.tar.xz
forums-b95fdacdd378877d277e261465da73deb06e50da.zip
[ticket/11700] Move all recent code to namespaces
PHPBB3-11700
Diffstat (limited to 'phpBB/phpbb/datetime.php')
-rw-r--r--phpBB/phpbb/datetime.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/phpbb/datetime.php b/phpBB/phpbb/datetime.php
index 3c6d4971b9..2d48c8311e 100644
--- a/phpBB/phpbb/datetime.php
+++ b/phpBB/phpbb/datetime.php
@@ -6,11 +6,13 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/
+namespace phpbb;
+
/**
* phpBB custom extensions to the PHP DateTime class
* This handles the relative formats phpBB employs
*/
-class phpbb_datetime extends DateTime
+class datetime extends \DateTime
{
/**
* String used to wrap the date segment which should be replaced by today/tomorrow/yesterday
@@ -28,14 +30,14 @@ class phpbb_datetime extends DateTime
static protected $format_cache = array();
/**
- * Constructs a new instance of phpbb_datetime, expanded to include an argument to inject
+ * Constructs a new \instance of \phpbb\datetime, expanded to include an argument to inject
* the user context and modify the timezone to the users selected timezone if one is not set.
*
* @param string $time String in a format accepted by strtotime().
* @param DateTimeZone $timezone Time zone of the time.
* @param user User object for context.
*/
- public function __construct($user, $time = 'now', DateTimeZone $timezone = null)
+ public function __construct($user, $time = 'now', \DateTimeZone $timezone = null)
{
$this->user = $user;
$timezone = $timezone ?: $this->user->timezone;