The date_default_timezone_get Function

The date_default_timezone_get function outputs the timezone set in the script.

Syntax

phpdate_default_timezone_get();

Example

Let's output the time zone used in the script:

php<?php
  echo date_default_timezone_get();
?>

Code execution result:

php'Europe/Moscow'

See Also