Skip to content

Commit

Permalink
Fix Date without hour
Browse files Browse the repository at this point in the history
  • Loading branch information
lennyrouanet committed Mar 6, 2024
1 parent 5840bf1 commit 58afb59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion component/Time/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(

$time = is_string($date) ? strtotime($date) : $date;

if (get_class($this) == self::class) {
if (!is_a($this, DateTime::class)) {
$time = (new \DateTime())->setTimestamp($time)->setTime(0, 0)->getTimestamp();
}

Expand Down

0 comments on commit 58afb59

Please sign in to comment.