aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/datetime.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2013-09-25 07:50:22 -0700
committerNils Adermann <naderman@naderman.de>2013-09-25 07:50:22 -0700
commit8da31332381b572f8d03c63d4c32a4f32ed8775f (patch)
tree1ef729ea3700bae463cd57b672e8de12311fe00d /phpBB/phpbb/datetime.php
parent717e2337b9276d9f9680110dff552ea536d0723c (diff)
parent645bd127dd53300b7877b779226ac53a4891620c (diff)
downloadforums-8da31332381b572f8d03c63d4c32a4f32ed8775f.tar
forums-8da31332381b572f8d03c63d4c32a4f32ed8775f.tar.gz
forums-8da31332381b572f8d03c63d4c32a4f32ed8775f.tar.bz2
forums-8da31332381b572f8d03c63d4c32a4f32ed8775f.tar.xz
forums-8da31332381b572f8d03c63d4c32a4f32ed8775f.zip
Merge pull request #1565 from naderman/ticket/11700
[WIP][ticket/11700] Namespaces
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..84b13202af 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;