|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #77672 Add getOffset method to DateTimeInterface
Submitted: 2019-02-26 20:15 UTC Modified: 2019-02-27 00:45 UTC
From: sites+php at dan dot cx Assigned:
Status: Closed Package: Date/time related
PHP Version: 7.3.2 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: sites+php at dan dot cx
New email:
PHP Version: OS:


 [2019-02-26 20:15 UTC] sites+php at dan dot cx
To get the timezone offset of a DateTime or DateTimeImmutable instance, you need to do this:


Please consider adding a `getOffset` method to `DateTimeInterface`, so this can be simplified to:



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-26 23:17 UTC] a at b dot c dot de
Um... it's already there?
 [2019-02-27 00:39 UTC]
-Status: Open +Status: Feedback
 [2019-02-27 00:45 UTC] sites+php at dan dot cx
-Status: Feedback +Status: Closed
 [2019-02-27 00:45 UTC] sites+php at dan dot cx
You're right. My mistake... Not sure how I missed that.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 17:01:32 2024 UTC