Windows PHP does not handle time zones correctly

1 minute readTroubleshooting

Description

PHP does not handle certain operating system time zones correctly on a Windows system. If the web server is running on a machine set for one of these time zones, users connected to that web server will see all times displayed as UTC times, instead of the web server time zone.

Workaround

In the config.php file, you must explicitly set the PHP “timezone_identifier”.

To set the timezone:

  1. Edit the following file.

    C:\Program Files\CloudBees\Software Delivery Automation\apache\htdocs\commander\config.php
  2. Add the following line anywhere between the opening and closing PHP tags:

    date_default_timezone_set("<timezone_identifier>");

    For example:

    To set the timezone for Taipei, you would add:

    date_default_timezone_set("Asia/Taipei");

    For more information, refer to supported time zones.