Easy Tutorial
❮ Php Imageantialias Func Curl_Reset ❯

PHP date_timezone_set() Function

PHP Date/Time Reference Manual

Example

Set the timezone for a DateTime object:


Definition and Usage

The date_timezone_set() function sets the timezone for a DateTime object.

Syntax

Parameter Description
object Required. Specifies a DateTime object created by date_create()
timezone Required. Specifies a DateTimeZone object representing the desired timezone. <br> <br> Tip: View a list of all supported timezones in PHP

Technical Details

Return Value: Returns the DateTime object in the specified format. Returns FALSE on failure.
PHP Version: 5.2+
--- ---
Changelog: PHP 5.3.0: The return value changed from NULL to DateTime.
--- ---

❮ Php Imageantialias Func Curl_Reset ❯