diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index f5ad5096bb..faedd79703 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -725,7 +725,7 @@ class user extends \phpbb\session
 			$utc = new \DateTimeZone('UTC');
 		}
 
-		$time = new $this->datetime($this, "@$gmepoch", $utc);
+		$time = new $this->datetime($this, '@' . (int) $gmepoch, $utc);
 		$time->setTimezone($this->timezone);
 
 		return $time->format($format, $forcedate);