Home Menu

date_default_timezone_get

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

Syntax

date_default_timezone_get ( void ) : string

Return

Returns a string.

Examples

1

<?

$return = date_default_timezone_get();

echo $return;

?>
UTC

2

<?

$timezone_identifier = "America/Los_Angeles";

date_default_timezone_set($timezone_identifier);

$return = date_default_timezone_get();

echo $return;

?>
America/Los_Angeles

PHP

JesusBible
HTMLCSSJSPHPSVGMore
AboutTerms