PHP ManualDateTime::getOffsetdate_offset_get(PHP 5 >= 5.2.0) DateTime::getOffset -- date_offset_get — Returns the timezone offset DescriptionObject oriented style
public int DateTime::getOffset
( void
)
Procedural style Returns the timezone offset. Parameters
Return Values
Returns the timezone offset in seconds from UTC on success
or ExamplesExample #1 DateTime::getOffset() example Object oriented style
<?php Procedural style
<?php The above examples will output: -18000 -14400 Note: -18000 = -5 hours, -14400 = -4 hours.
![]() |
PHP-Index
New Tutorial entries
|