<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
const MYSQL = 'Y-m-d H:i:s';
const HTTP = 'D, d M Y H:i:s \G\M\T';
const JSON = 'Y-m-d\TH:i:s.v\Z';
+ const API = 'D M d H:i:s +0000 Y';
static $localTimezone = 'UTC';
* @return string
* @throws Exception
*/
- public static function utc($time, $format = self::MYSQL)
+ public static function utc(string $time, string $format = self::MYSQL): string
{
return self::convert($time, 'UTC', 'UTC', $format);
}
* @return string
* @throws Exception
*/
- public static function utcNow($format = self::MYSQL)
+ public static function utcNow(string $format = self::MYSQL): string
{
return self::utc('now', $format);
}