|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-28 18:17 UTC] derick@php.net
[2007-06-29 17:22 UTC] mattsch at gmail dot com
[2007-06-30 02:13 UTC] rasmus@php.net
[2007-06-30 16:58 UTC] mattsch at gmail dot com
[2007-07-12 19:01 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 04:00:02 2025 UTC |
Description: ------------ When attempting to create a new date with a negative year and display that date, the format function returns today's date with the timezone offset modified and set to what the negative year should be. Reproduce code: --------------- <? $date = new DateTime('-2007-06-28'); echo $date->format(DATE_ISO8601); ?> Expected result: ---------------- Output: -2007-06-28T11:31:19-0500 Actual result: -------------- Outputs: 2007-06-28T11:31:19-2007