#48045 [NEW]: DateTimeZone::getOffset() description problem
| From: | gebi_hu at yahoo dot com | Date: | Wed, 22 Apr 2009 12:57:58 +0000 |
| Subject: | #48045 [NEW]: DateTimeZone::getOffset() description problem | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-2140@lists.php.net to get a copy of this message | ||
From: gebi_hu at yahoo dot com
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: DateTimeZone::getOffset() description problem
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."
--
Edit bug report at http://bugs.php.net/?id=48045&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48045&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48045&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48045&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48045&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48045&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48045&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48045&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48045&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48045&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48045&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48045&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48045&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48045&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48045&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48045&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48045&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48045&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48045&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48045&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48045&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48045&r=mysqlcfg