From: danielc at analysisandsolutions dot com
Operating system: n/a
PHP version: 5.0.0b1 (beta1)
PHP Bug Type: Feature/Change Request
Bug description: allow colons in time zone offset to strtotime()
Description:
------------
The strtotime() function doesn't allow time zone offsets to contain colons
":" in them. Colons are included in several offset formmating standards.
Reproduce code:
---------------
$t = '2003-10-28 10:20:30-0800';
echo date('Y-m-d H:i:s T', strtotime($t)) . "\n<br />\n";
$t = '2003-10-28 10:20:30-08:00';
echo date('Y-m-d H:i:s T', strtotime($t)) . "\n";
Expected result:
----------------
2003-10-28 13:20:30 EST
<br />
2003-10-28 13:20:30 EST
Actual result:
--------------
2003-10-28 13:20:30 EST
<br />
1969-12-31 18:59:59 EST
On Windows 2000, the attempt with the colons in the offset produces a
negative timestamp, so the beloved "Windows does not support dates prior
to midnight" warning arises.
--
Edit bug report at http://bugs.php.net/?id=26090&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26090&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26090&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26090&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26090&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26090&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=26090&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26090&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26090&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26090&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26090&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26090&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26090&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26090&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26090&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26090&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26090&r=float