Help Center> Object Storage Service> PHP> Troubleshooting> Time Zone Configuration Failure
Updated on 2022-09-07 GMT+08:00

Time Zone Configuration Failure

If an error (such as Uncaught exception 'Exception' with message 'DateTime::__construct():) is displayed when you use OBS PHP SDK for secondary development, the time zone configuration is incorrect. You can configure the time zone using either of the following methods:

  1. Modify the php.ini file by adding date.timezone = xxx in the [date] tag, for example, date.timezone = UTC.
  2. Call date_default_timezone_set('xxx') in the program to directly set the time zone.