-
Type: Bug Report
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.2.1-B1
-
Fix Version/s: 5.2.1-B2
-
Component/s: Install / Upgrages, PHP Compatibility
-
Labels:None
-
Change Log Group:Fixed
-
Change Log Message:Fixed timezone detection during installation on PHP 5.2+.
-
Story Points:1
-
Copy Issue Key:
-
Patch Instructions:
In previous In-Portal versions we've used putenv('TZ', ...) code to set website timezone. Then in "kUtul::dateFromTimestamp" method for PHP 5.2 and smaller versions we had code, that was doing getenv('TZ') and all worked.
Then, in INP-1183 task, later we've replaced "putenv" function with "date_default_timezone_set" function, but forgot to replace "getenv" function usage with "date_default_timezone_get" function call.
Because of that each call to "kUtul::dateFromTimestamp" method (on PHP 5.2 and smaller versions) was producing following warning:
Warning (#957): DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone () in ...\core\kernel\globals.php on line 732