Getting the default timezone

by Manigandan 2011-06-04 16:40:04


date_default_timezone_set('America/Los_Angeles');

$script_tz = date_default_timezone_get();

if (strcmp($script_tz, ini_get('date.timezone'))){
echo 'Script timezone differs from ini-set timezone.';
} else {
echo 'Script timezone and ini-set timezone match.';
}
?>

Tagged in:

1002
like
0
dislike
0
mail
flag

You must LOGIN to add comments