php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #48045 DateTimeZone::getOffset() description problem
Submitted: 2009-04-22 12:57 UTC Modified: 2009-04-22 13:34 UTC
From: gebi_hu at yahoo dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gebi_hu at yahoo dot com
New email:
PHP Version: OS:

 

 [2009-04-22 12:57 UTC] gebi_hu at yahoo dot com
Description:
------------
The description says the offset to GMT is calculated using the timezone set in the DateTime object used. Actually it is calculated using the timezone of the DateTimeZone object itself. This is correctly explained in the example's comment.

Also the Example #1 says it is an example of the procedural style call:

---> Example #1 timezone_offset_get() examples

but it is actually an example of the class style call:

---> $timeOffset = $dateTimeZoneJapan->getOffset($dateTimeTaipei);

Reproduce code:
---------------
---
From manual page: datetimezone.getoffset
---


Expected result:
----------------
"... The GMT offset is calculated with the timezone information contained in the DateTimeZone object being used."

Actual result:
--------------
"... The GMT offset is calculated with the timezone information contained in the DateTime object being used."

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-22 13:34 UTC] rquadling@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 12:00:02 2026 UTC