Add Temporal::utcNow()
This commit is contained in:
@@ -123,6 +123,17 @@ class Temporal
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* convert() shorthand for UTC now.
|
||||
*
|
||||
* @param string $format DateTime format string or Temporal constant
|
||||
* @return string
|
||||
*/
|
||||
public static function utcNow($format = self::MYSQL)
|
||||
{
|
||||
return self::convert('now', 'UTC', 'UTC', $format);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief General purpose date parse/convert/format function.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user