PHP当前时区和GMT时区之间的小时数

I'm looking for a way to find the number of hours of difference between the time zone of the PHP configuration and the GMT time.

For example if the PHP config time zone is set to America/New_York, find the number "-4" if the in Brussels "+1" etc.

Thanks

Err, what if you try ;) ?

date('O');

You could use date_default_timezone_get() to get the timezone that has been set and determine based on this what the difference is from GMT. It will return the value from date_default_timezone_set() or the value set in date.timezone in the php.ini file.