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

PHP date_offset_get() Function

PHP date_offset_get() Function

PHP Date/Time PHP Date/Time Reference Manual

Example

Return the time zone offset in seconds relative to UTC for Oslo (Norway, Europe) in winter and summer:

"; echo date_offset_get($summer) . " seconds."; ?>

Run Example »


Definition and Usage

The date_offset_get() function returns the time zone offset.

Syntax

date_offset_get(

object);

Parameters Description
object Required. Specifies a DateTime object returned by date_create() DateTime object returned by

Technical Details

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

PHP Date/Time PHP Date/Time Reference Manual