How to get default time zone in PHP

by Lalita 04-Aug-19

0 277


date_default_timezone_get() function is used to get default timezone in PHP. This is an inbuilt function. It returns the default timezone used by all date/time functions.

Example:

<?php 
 $default_timezone= date_default_timezone_get();
 echo $default_timezone;
?>

Output:

Asia/Kolkata


Share:


Comments

    Waiting for your comments

Leave a Reply