Skip to content

Commit 2f6b8e0

Browse files
committed
Set timezone to Dutch, as this is how the dates were recorded
1 parent bc83629 commit 2f6b8e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ResponseParser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ function (&$v) {
3333

3434
$station = $arr[0];
3535
if ($isHourly) {
36-
$date = \DateTime::createFromFormat('Ymd', $arr[1]);
36+
$date = \DateTime::createFromFormat('Ymd', $arr[1], new \DateTimeZone('Europe/Amsterdam'));
3737
$date->setTime($arr[2], 0, 0);
3838
$ret['datetime'] = $date->format(\DateTime::ISO8601);
3939
} else {
40-
$date = \DateTime::createFromFormat('Ymd', $arr[1]);
40+
$date = \DateTime::createFromFormat('Ymd', $arr[1], new \DateTimeZone('Europe/Amsterdam'));
4141
$ret['date'] = $date->format('Y-m-d');
4242
}
4343
$values = array_splice($arr, $isHourly ? 3 : 2);

0 commit comments

Comments
 (0)