mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Merge branch 'patch-time-gmt' of https://github.com/shama/cakephp into shama-patch-time-gmt
This commit is contained in:
commit
f09904ca91
1 changed files with 3 additions and 4 deletions
|
@ -676,10 +676,10 @@ class TimeHelper extends AppHelper {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns gmt, given either a UNIX timestamp or a valid strtotime() date string.
|
||||
* Returns gmt as a UNIX timestamp.
|
||||
*
|
||||
* @param string $string Datetime string
|
||||
* @return string Formatted date string
|
||||
* @param string $string UNIX timestamp or a valid strtotime() date string
|
||||
* @return integer UNIX timestamp
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting
|
||||
*/
|
||||
public function gmt($string = null) {
|
||||
|
@ -688,7 +688,6 @@ class TimeHelper extends AppHelper {
|
|||
} else {
|
||||
$string = time();
|
||||
}
|
||||
$string = $this->fromString($string);
|
||||
$hour = intval(date("G", $string));
|
||||
$minute = intval(date("i", $string));
|
||||
$second = intval(date("s", $string));
|
||||
|
|
Loading…
Add table
Reference in a new issue