• Object Storage Service

  1. Help Center
  2. Object Storage Service
  3. Developer Guide (PHP SDK)
  4. Troubleshooting
  5. Time Zone Configuration Failure

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.