Bug #69806 [Opn->Csd]: Incorrect date from timestamp

From: Date: Tue, 06 Apr 2021 19:53:16 +0000
Subject: Bug #69806 [Opn->Csd]: Incorrect date from timestamp
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233253@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69806&edit=1 ID: 69806 Updated by: derick@php.net Reported by: ryan dot brothers at gmail dot com Summary: Incorrect date from timestamp -Status: Open +Status: Closed Type: Bug Package: Date/time related Operating System: Linux PHP Version: 5.6.10 -Assigned To: +Assigned To: derick Block user comment: N Private report: N New Comment: The fix for this bug has been committed. If you are still experiencing this bug, try to check out latest source from https://github.com/php/php-src and re-test. Thank you for the report, and for helping us make PHP better. Fixed for PHP 8.1. Previous Comments: ------------------------------------------------------------------------ [2015-06-12 01:37:42] ryan dot brothers at gmail dot com Description: ------------ I am seeing an issue where PHP's date() function is returning a different date/time compared to the linux date command for certain dates. In the below example, I was expecting the 2 dates to be the same. It possibly looks to be related to Daylight Saving Time not being included by the date() function for this date. Test script: --------------- <?php ini_set('date.timezone', 'America/New_York'); echo date('Y-m-d H:i:s', 2377224000)."\n"; echo TZ=America/New_York date --date='@2377224000' "+%Y-%m-%d %H:%M:%S"."\n"; exit; Expected result: ---------------- 2045-05-01 00:00:00 2045-05-01 00:00:00 Actual result: -------------- 2045-04-30 23:00:00 2045-05-01 00:00:00 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69806&edit=1

« previous php.bugs (#233253) next »