PHP date_default_timezone_get() Function

Definition

The date_default_timezone_get() function returns the default timezone used by date/time functions.

Syntax

PHP date_default_timezone_get() Function has the following syntax.

date_default_timezone_get();

Return

PHP date_default_timezone_get() Function returns the timezone as a string.

Example

Return the default timezone:


<?php
echo date_default_timezone_get();
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions