|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-13 08:11 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 10:00:01 2025 UTC |
Description: ------------ When using strtotime() to parse a date string with a certain timezone offset it returns an incorrect result. I got this kind of a timezone "Tue, 30 Jan 2007 12:27:00 +0001" from an rss feed. Although they actually mean "+0100" strtotime() should return a time with one minute difference, not 1 month. Reproduce code: --------------- <?php putenv('TZ=Pacific/Auckland'); echo date("Y-m-d H:i:s\n",strtotime("Tue, 30 Jan 2007 12:27:00 +0001")); ?> Expected result: ---------------- 2007-01-31 01:26:00 Actual result: -------------- 2007-03-04 13:27:00