How to get the default timezone in PHP?

by Dinesh 2013-12-25 19:40:40

Code for Getting the default timezone

date_default_timezone_set('Europe/London');
if (date_default_timezone_get()) {
echo 'date_default_timezone_set: ' . date_default_timezone_get() . '
';
}
if (ini_get('date.timezone')) {
echo 'date.timezone: ' . ini_get('date.timezone');
}
?>

Tagged in:

987
like
0
dislike
0
mail
flag

You must LOGIN to add comments