By default PHP get the timezone from the "php.ini" file.
Get Current Timezone:
echo date_default_timezone_get(); // Will return current timezone used by PHP.
Set Timezone:
date_default_timezone_set('Asia/Kolkata'); // Will set PHP timezone to specified.
Get Current Timezone:
echo date_default_timezone_get(); // Will return current timezone used by PHP.
Set Timezone:
date_default_timezone_set('Asia/Kolkata'); // Will set PHP timezone to specified.
No comments:
Post a Comment