w3resource

PHP: date_default_ timezone_get() function

Description

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



Follow us on Facebook and Twitter for latest update.