未匹配标题

Changes in PHPdatetimesupport

Since PHP 5.1.0, there has been an extension nameddatein the PHP core. This is the new implementation of PHP's datetime support. Although it will attempt to guess your system's timezone setting, you should set the timezone manually. You can do this in any of three ways:

  • in your php.ini using the date.timezone ini directive
  • on your system using the tz environmental variable
  • from your script using the convenience function date_default_timezone_set()

All supportedtimezonesare listed in the PHP Manual.

With the advent of PHP 5.2.x, there areobjectrepresentations of the date and timezone, namedDateTimeandDateTimeZonerespectively. The methods map to existing procedural date functions.