PHP date_default_timezone_get() Function
ExampleGet your own PHP Server
Return the default timezone:
<?php
echo date_default_timezone_get();
?>
Try it Yourself »
Definition and Usage
The date_default_timezone_get() function returns the default timezone used by all date/time functions in the script.
Syntax
date_default_timezone_get()
Technical Details
Return Value: | Returns the timezone as a string |
---|---|
PHP Version: | 5.1+ |
PHP Changelog: | PHP 5.4: The TZ variable is no longer used to guess the timezone |
❮ PHP Date/Time Reference