|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-01-06 23:39 UTC] dv at josheli dot com
Description:
------------
date('r') on windows puts an extra space in the formatted result.
found on 4.3.4, php5 beta2, php5-win32-200401070330 snap
Reproduce code:
---------------
php -r "echo date('r');"
Expected result:
----------------
Tue, 6 Jan 2004 22:26:00 -0600
^
Actual result:
--------------
Tue, 6 Jan 2004 22:26:00 -0600
^^
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 12:00:02 2025 UTC |
Okay, thanks for your time. But I don't quite follow. i don't see anything in the manual that states your solution. php -r "echo date('r', mktime(0, 0, 0, 1, 10, 2004));" seems to be a workaround. the manual says "timestamp is optional", the 'r' format character claims an "RFC 822 formatted date", and nowhere in RFC 822 does it show that extra space.The line php -r "echo date('r', mktime(0, 0, 0, 1, 10, 2004));" just shows, that there is only one space between "," and "10", so the two spaces in case of a one-digit daynumber is just for format. Btw. 822 was obsoleted by 2822, as you might've noticed, that 4-digit years are not allowed by 822.