php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77671 DateTimeZone->getOffset should take DateTimeInterface
Submitted: 2019-02-26 19:48 UTC Modified: 2019-02-26 20:39 UTC
From: sites+php at dan dot cx Assigned: salathe (profile)
Status: Closed Package: Date/time related
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
28 - 17 = ?
Subscribe to this entry?

 
 [2019-02-26 19:48 UTC] sites+php at dan dot cx
Description:
------------
---
From manual page: https://php.net/datetimezone.getoffset
---

The documentation for DateTimeZone getOffset says that it takes an instance of DateTime. However, it needs to be updated as per the changes in bug #68062, as it can take a DateTimeImmutable too: https://3v4l.org/ChCR5. 

The documentation should be updated to reflect that it actually takes "DateTimeInterface"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-26 20:38 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=346912
Log: update type for DateTimeZone::getOffset's $datetime parameter (doc #77671)
 [2019-02-26 20:39 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 [2019-02-26 20:39 UTC] salathe@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-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 14:01:30 2024 UTC