Permalink
Browse files

Remove extra fromString in TimeHelper::gmt and update docblock

  • Loading branch information...
1 parent bab6136 commit 72502e8fec86ad5bb2894e687e44115cbb4de3bc @shama shama committed Nov 7, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/Cake/View/Helper/TimeHelper.php
@@ -676,10 +676,10 @@ public function wasWithinLast($timeInterval, $dateString, $userOffset = null) {
}
/**
- * 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
+ * @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 @@ public function gmt($string = null) {
} else {
$string = time();
}
- $string = $this->fromString($string);
$hour = intval(date("G", $string));
$minute = intval(date("i", $string));
$second = intval(date("s", $string));

0 comments on commit 72502e8

Please sign in to comment.