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:
Josh Sherman 2012-10-10 22:30:21 -04:00
parent f884a2e45e
commit 9fbc4171d7
2 changed files with 28 additions and 0 deletions

View file

@ -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);
}
}
?>