mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-12-04 19:16:13 +01:00
Assume default timezone if not provided.
Data is coming from Germany and affects German places only. We therefore expect German timezone.
This commit is contained in:
parent
265cb27236
commit
73db8b5d9d
1 changed files with 2 additions and 2 deletions
|
@ -71,12 +71,12 @@ class OpeningHour
|
|||
{
|
||||
$from = null;
|
||||
if (isset($rawData['from'])) {
|
||||
$timeZone = new \DateTimeZone($rawData['from']['timezone']);
|
||||
$timeZone = new \DateTimeZone($rawData['from']['timezone'] ?? 'Europe/Berlin');
|
||||
$from = new \DateTimeImmutable($rawData['from']['date'], $timeZone);
|
||||
}
|
||||
$through = null;
|
||||
if (isset($rawData['through'])) {
|
||||
$timeZone = new \DateTimeZone($rawData['through']['timezone']);
|
||||
$timeZone = new \DateTimeZone($rawData['through']['timezone'] ?? 'Europe/Berlin');
|
||||
$through = new \DateTimeImmutable($rawData['through']['date'], $timeZone);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue