Add Temporal::utcNow()

This commit is contained in:
Hypolite Petovan
2018-01-25 23:26:51 -05:00
parent 38ff1b455b
commit 8aff8a76eb
51 changed files with 191 additions and 180 deletions

View File

@@ -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.
*