Added timestamp method
Returns a UT timestamp in the specified format. Defaults to everyone's favorite format Y-m-d H:i:s
This commit is contained in:
parent
f884a2e45e
commit
9fbc4171d7
2 changed files with 28 additions and 0 deletions
|
@ -124,6 +124,20 @@ class Time
|
|||
|
||||
return $age;
|
||||
}
|
||||
|
||||
/**
|
||||
* Timestamp
|
||||
*
|
||||
* Current Universal Time in the specified format.
|
||||
*
|
||||
* @static
|
||||
* @param string $format format of the timestamp
|
||||
* @return string $timestamp formatted timestamp
|
||||
*/
|
||||
public static function timestamp($format = 'Y-m-d H:i:s')
|
||||
{
|
||||
return gmdate($format);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue