Skip to content

Commit

Permalink
date time interface
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy-j committed Mar 10, 2017
1 parent f780a61 commit 73cf66b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Spiral/Models/Accessors/AbstractTimestamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ abstract protected function fetchTimestamp($value): int;
*/
protected function castTimestamp($datetime, \DateTimeZone $timezone = null)
{
if ($datetime instanceof \DateTime) {
if ($datetime instanceof \DateTimeInterface) {
return $datetime->getTimestamp();
}

Expand Down

0 comments on commit 73cf66b

Please sign in to comment.