Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1235

Fix timezone detection on PHP 5.2 and smaller

    XMLWordPrintable

    Details

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
                Reviewer:
                Dmitry Andrejev [Intechnic]
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: