Returns the time zone offset in seconds relative to UTC for Oslo (in European Norway) winter and summer:
<?php$winter=date_create("2013-12-31",timezone_open("Europe/Oslo"));$summer=date_create("2013-06-30",timezone_open("Europe/Oslo"));echo date_offset_get($winter) . " seconds.<br>";echo date_offset_get($summer) . " seconds.";?>The date_offset_get() function returns the time zone offset.
date_offset_get( object);
parameter | describe |
---|---|
object | Required. Specifies a DateTime object returned by date_create(). |
Return value: | Returns the time zone in seconds relative to UTC on success, or FALSE on failure. |
---|---|
PHP version: | 5.2+ |