Bug #76576 [NoF->Csd]: DateTime formats different Timezones with 'e' and 'T' format codes

From: Date: Wed, 04 Jan 2023 09:26:58 +0000
Subject: Bug #76576 [NoF->Csd]: DateTime formats different Timezones with 'e' and 'T' format codes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243325@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76576&edit=1 ID: 76576 Updated by: heiglandreas@php.net Reported by: nospam at tils dot org Summary: DateTime formats different Timezones with 'e' and 'T' format codes -Status: No Feedback +Status: Closed Type: Bug Package: Date/time related Operating System: Ubuntu PHP Version: 7.2.7 -Assigned To: +Assigned To: heiglandreas Block user comment: N Private report: N New Comment: Are we talking about two different things here? As the initial issue was about something completely different. The original issue seems not to be reproducible in a controlled environment. See https://3v4l.org/aP36J Please create a separate bug-report for the issue from the last comments. Previous Comments: ------------------------------------------------------------------------ [2023-01-03 22:05:39] aaron dot hammond at loanpro dot io When running this script. $d2 = new DateTime(date("Y-m-d"), new DateTimeZone('America/Phoenix')); echo $d2->format('Y-m-d H:i:s'); I get the same result. ------------------------------------------------------------------------ [2023-01-03 22:00:19] aaron dot hammond at loanpro dot io I changed my date time to January 3 8:00 am on my computer. Ran this $d2 = new DateTime(date("Y-m-d"), new DateTimeZone('UTC')); echo $d2->format('Y-m-d H:i:s'); And I get this 2023-01-03 00:00:00 Change my computer Date to January 3 8:00 pm on my computer. Ran the same script. I get this. 2023-01-04 00:00:00 ------------------------------------------------------------------------ [2021-04-18 04:22:10] php-bugs at lists dot php dot net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. ------------------------------------------------------------------------ [2021-04-06 18:39:57] derick@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. I can't reproduce this. ------------------------------------------------------------------------ [2018-07-04 09:59:31] nospam at tils dot org Regarding your assumption I added the output of DateTime::listAbbrevations(). I didnt find a method to add a file here, so here you can find it: https://cloud.tils.org/index.php/s/9DSZSL8arndXG7b ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=76576 -- Edit this bug report at https://bugs.php.net/bug.php?id=76576&edit=1

« previous php.bugs (#243325) next »