Skip to content

Commit

Permalink
fixup! fix: add support for Microsoft time zones
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <[email protected]>
  • Loading branch information
SebastianKrupinski committed Nov 26, 2024
1 parent 14bd34e commit c3e41ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/dav/lib/CalDAV/TimeZoneFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TimeZoneFactory {
*
* @var array<string,string> MS2IANA
*/
const MS2IANA = [
public const MS2IANA = [
'AUS Central Standard Time' => 'Australia/Darwin',
'Aus Central W. Standard Time' => 'Australia/Eucla',
'AUS Eastern Standard Time' => 'Australia/Sydney',
Expand Down Expand Up @@ -207,7 +207,7 @@ public static function toIANA(string $name): ?string {
*
* @return DateTimeZone|null
*/
public function fromName(string $name): DateTimeZone|null {
public function fromName(string $name): ?DateTimeZone {
// if zone name is MS convert to IANA, otherwise just assume the zone is IANA
if (self::isMS($name)) {
$zone = @timezone_open(self::toIANA($name));
Expand Down

0 comments on commit c3e41ad

Please sign in to comment.