w3resource

PHP: date_default_ timezone_get() function

PHP: Gets the default timezone used by all date/time functions in a script

The date_default_timezone_get() is used to get the default timezone, used by all date/time functions in a script.

Version:

(PHP 4 and above)

Syntax:

date_default_timezone_get()

Return value:

A string.

Value Type: String.

Example:

<?php
echo(date_default_timezone_get());
?>

Output:

UTC

View the example of in the browser

See also

PHP Function Reference

Previous: checkdate
Next: date_default_ timezone_set



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/php/function-reference/date_default_timezone_get.php