How to get default time zone in PHP || PHP Codes

How to get default time zone in PHP

by Lalita

0 2794

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



Best WordPress Hosting


Share:

SSL for business, from $12.88


Leave a Reply


Comments
    Waiting for your comments

Coding Tag WhatsApp Chat
Coding Tag WhatsApp Chat