|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-04-06 19:53 UTC] derick@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: derick
[2021-04-06 19:53 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 03:00:02 2025 UTC |
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