Skip to content

Commit

Permalink
Merge pull request #263 from cakephp/issue-262
Browse files Browse the repository at this point in the history
Fix parsing of date in Ymd format.
  • Loading branch information
markstory authored May 26, 2020
2 parents 3ff9eb5 + 0a2e5d3 commit 9309d85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/FrozenTimeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ trait FrozenTimeTrait
*/
protected function stripTime($time, $tz): string
{
if (is_int($time) || ctype_digit($time)) {
if (is_int($time)) {
return gmdate('Y-m-d 00:00:00', $time);
}

Expand Down
1 change: 1 addition & 0 deletions tests/TestCase/Date/ConstructTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public function inputTimeProvider()
['Mon, 15 Aug 2005 15:52:01 +0000'],
['Mon, 15 Aug 2005 15:52:01 +0000'],
['2005-08-15T15:52:01+00:00'],
['20050815'],
];
}

Expand Down

0 comments on commit 9309d85

Please sign in to comment.