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

PHP date_default_timezone_get() Function

PHP Date/Time PHP Date/Time Reference

Example

Return the default timezone:

<?php
echo date_default_timezone_get();
?>

Run example »

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+
Changelog: From PHP 5.4+; The timezone is no longer guessed from information in OS, and the TZ variable is no longer used


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

SHARE THIS PAGE