Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

date_default_timezone_get

Description

The date_default_timezone_get of Date / Time for PHP 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
HomeMenu