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

PHP date_timezone_get() Function

PHP Date/Time PHP Date/Time Reference

Example

Return the timezone of the given DateTime object:

<?php
$date=date_create(null,timezone_open("Europe/Paris"));
$tz=date_timezone_get($date);
echo timezone_name_get($tz);
?>

Run example »

Definition and Usage

The date_timezone_get() function returns the time zone of the given DateTime object.


Syntax

date_timezone_get(object);

Parameter Description
object Required. Specifies a DateTime object returned by date_create().

Technical Details

Return Value: Returns a 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 BUILDING

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

SHARE THIS PAGE

facebook