Skip to content

Commit 12c2e7d

Browse files
committed
Minor fixes
1 parent 71bdb2e commit 12c2e7d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/vendor
22
/.vagrant/
33
/ubuntu-xenial-16.04-cloudimg-console.log
4-
/.idea/

Cmfcmf/OpenWeatherMap/UVIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ class UVIndex
5151
*/
5252
public function __construct($data, $lat = null, $lon = null)
5353
{
54-
$utctz = new \DateTimeZone('UTC');
5554
if (isset($data->dt)) {
5655
$this->time = \DateTime::createFromFormat('U', $data->dt);
5756
} else {
57+
$utctz = new \DateTimeZone('UTC');
5858
$this->time = new \DateTime($data->date_iso, $utctz);
5959
}
6060
$this->location = new Location($data->lat ?? $lat, $data->lon ?? $lon);

0 commit comments

Comments
 (0)