#49773 [NEW]: DateTime class getOffset function documentation bug

From: Date: Mon, 05 Oct 2009 05:16:44 +0000
Subject: #49773 [NEW]: DateTime class getOffset function documentation bug
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2879@lists.php.net to get a copy of this message
From: rohit at rhovisions dot com Operating system: Windows PHP version: 5.3.0 PHP Bug Type: Documentation problem Bug description: DateTime class getOffset function documentation bug Description: ------------ At http://www.php.net/manual/en/datetime.getoffset.php it says "DateTime::getOffset — Returns the daylight saving time offset". This is not accurate, as the function returns the current timezones offset from GMT/UTC (I don't know which one). For EST for example, it shows -14400 seconds for the summer, which is -4 hours, the EST offset from GMT. If I set a winter date, I get -18000 seconds, -5 hours, which is the winter offset as appropriate, from GMT. Its really misleading to simply say that getOffset returns the daylight savings time offset when that's not what it shows at all. I've been searching for a function to show the DST offset, thought this was the solution, and now find that's not the case. Reproduce code: --------------- --- From manual page: datetime.getoffset --- -- Edit bug report at http://bugs.php.net/?id=49773&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49773&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49773&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49773&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49773&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49773&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49773&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49773&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49773&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49773&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49773&r=support Expected behavior: http://bugs.php.net/fix.php?id=49773&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49773&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49773&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49773&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49773&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49773&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49773&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49773&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49773&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49773&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49773&r=mysqlcfg

« previous php.doc.bugs (#2879) next »