Version 4.7.8

This commit is contained in:
Neo committed 2025-12-19 16:10:42 -08:00
1 parent 7b7404e741
commit fd22d99e69
688 files changed
+19814 -10890

No files matched your search

+9 -18
View File
@@ -35,7 +35,6 @@ class _DateTime extends \DateTime
$obj->setTimestamp( (int) $timestamp );
if ( !$bypassTimezone AND \IPS\Dispatcher::hasInstance() and \IPS\Member::loggedIn()->timezone )
{
$validTimezone = TRUE;
if( \in_array( \IPS\Member::loggedIn()->timezone, static::getTimezoneIdentifiers() ) )
{
try
@@ -44,24 +43,9 @@ class _DateTime extends \DateTime
}
catch ( \Exception $e )
{
$validTimezone = FALSE;
}
}
else
{
$validTimezone = FALSE;
}
if( ! $validTimezone )
{
\IPS\Member::loggedIn()->timezone = null;
if ( \IPS\Member::loggedIn()->member_id )
{
\IPS\Member::loggedIn()->save();
}
}
}
return $obj;
}
@@ -99,7 +83,14 @@ class _DateTime extends \DateTime
{
return 'America/Argentina/' . \substr( $timezone, 8 );
}
return $timezone;
/* Chromium reports the wrong timezones for these locations - https://bugs.chromium.org/p/chromium/issues/detail?id=580195 */
return match ( $timezone )
{
'Asia/Calcutta' => 'Asia/Kolkata',
'Asia/Katmandu' => 'Asia/Kathmandu',
default => $timezone,
};
}
/**