Add Temporal::utcNow()
This commit is contained in:
parent
38ff1b455b
commit
8aff8a76eb
51 changed files with 191 additions and 180 deletions
|
@ -73,7 +73,7 @@ class ParseUrl
|
|||
[
|
||||
'url' => normalise_link($url), 'guessing' => !$no_guessing,
|
||||
'oembed' => $do_oembed, 'content' => serialize($data),
|
||||
'created' => Temporal::convert()
|
||||
'created' => Temporal::utcNow()
|
||||
],
|
||||
true
|
||||
);
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue