add timezone support

This commit is contained in:
Dennis Eichhorn 2020-03-22 19:09:05 +01:00
parent 862da62226
commit 8fb8659062
4 changed files with 18 additions and 0 deletions

View File

@ -50,11 +50,19 @@
"tablespoon": "Metric tblsp",
"glass": "Metric cup"
},
"timezone": "Europe/Berlin",
"datetime": {
"very_short": "d.m",
"short": "m.y",
"medium": "Y.m.d",
"long": "Y.m.d h:i",
"very_long": "Y.m.d h:i:s"
},
"precision": {
"very_short": 0,
"short": 1,
"medium": 2,
"long": 3,
"very_long": 5
}
}

View File

@ -50,6 +50,7 @@
"tablespoon": "Metric tblsp",
"glass": "Metric cup"
},
"timezone": "America/New_York",
"datetime": {
"very_short": "d.m",
"short": "m.y",

View File

@ -50,11 +50,19 @@
"tablespoon": "Metric tblsp",
"glass": "Metric cup"
},
"timezone": "Europe/Rome",
"datetime": {
"very_short": "d.m",
"short": "m.y",
"medium": "Y.m.d",
"long": "Y.m.d h:i",
"very_long": "Y.m.d h:i:s"
},
"precision": {
"very_short": 0,
"short": 1,
"medium": 2,
"long": 3,
"very_long": 5
}
}

View File

@ -304,6 +304,7 @@ class Localization implements \JsonSerializable
$this->setArea($locale['area'] ?? []);
$this->setVolume($locale['volume'] ?? []);
$this->setPrecision($locale['precision'] ?? []);
$this->setTimezone($locale['timezone'] ?? 'America/New_York');
$this->setDatetime($locale['datetime'] ?? []);
}