Child pages
  • [install, php-compatibility] Incorrect timezone detection on PHP 5.2 and smaller
Skip to end of metadata
Go to start of metadata

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 - Getting issue details... STATUS  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:

DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone () in ...\core\kernel\globals.php on line 732


Related Tasks

INP-1235 - Getting issue details... STATUS