X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP timezone_open() Function

PHP Date/Time PHP Date/Time Reference

Example

Create a new DateTimeZone object, then return the name of the timezone:

<?php
$tz=timezone_open("Europe/Paris");
echo timezone_name_get($tz);
?>

Run example »

Definition and Usage

The timezone_open() creates a new DateTimeZone object.


Syntax

timezone_open(timezone);

Parameter Description
timezone Required. Specifies a timezone

Tip: Look at a list of all supported timezones in PHP

Technical Details

Return Value: Returns the DateTimeZone object on success. FALSE on failure
PHP Version: 5.2+


PHP Date/Time PHP Date/Time Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook