We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53e6c97 commit cc240faCopy full SHA for cc240fa
Cmfcmf/OpenWeatherMap/Util/Time.php
@@ -47,11 +47,11 @@ class Time
47
public function __construct($from, $to = null)
48
{
49
if (isset($to)) {
50
- $from = (is_object($from)) ? $from : new \DateTime($from);
51
- $to = (is_object($to)) ? $to : new \DateTime($to);
+ $from = (is_a($from, 'DateTime')) ? $from : new \DateTime($from);
+ $to = (is_a($to, 'DateTime')) ? $to : new \DateTime($to);
52
$day = new \DateTime($from->format('Y-m-d'));
53
} else {
54
55
$day = clone $from;
56
$to = clone $from;
57
$to = $to->add(new \DateInterval('PT23H59M59S'));
0 commit comments