Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP timezone_offset_get() Function

PHP timezone_offset_get() Function

PHP Date/Time PHP Date/Time Reference Manual

Example

Return the time zone offset relative to GMT:

Run Example »


Definition and Usage

timezone_offset_get() returns the time zone offset relative to GMT.

Syntax

timezone_offset_get

(object,datetime);

Parameters Description
object Required. Specifies a DateTime object returned by timezone_open() A DateTimeZone object returned.
datetime Required. Specifies the date/time for which to calculate the offset.

Technical Details

Return Value: Returns the time zone offset in seconds on success, or FALSE on failure.
PHP Version: 5.2+

PHP Date/Time PHP Date/Time Reference Manual