ID:               44426
 Updated by:       [EMAIL PROTECTED]
 Reported By:      krister dot karlstrom at arcada dot fi
-Status:           Assigned
+Status:           Closed
 Bug Type:         Feature/Change Request
 Operating System: Ubuntu
 PHP Version:      5.2.5
 Assigned To:      derick
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2008-03-13 10:27:47] [EMAIL PROTECTED]

Assigned to Derick

------------------------------------------------------------------------

[2008-03-13 08:05:11] krister dot karlstrom at arcada dot fi

Description:
------------
The default datestring format returned by MS-SQL 2000 through the
MS-SQL support in PHP 5.2.3 (Ubuntu package) using the provided FreeTDS
library contains milliseconds that are separated with a colon, not a
dot. This breaks the parsing of the datestring in strtotime(), which
only seems to allow milliseconds separated by a dot. For compatibility
it would be great if strtotime() also could parse these strings.

This is the format returned by MS-SQL 2000 from a datetime column:
Aug 27 2007 12:00:00:000AM

I hereby request that strtotime() should be able to parse this string,
with our without the AM/PM (using 12 h or 24 h-format). For
compatibility issues it would probably also be good if strtotime() could
parse the string Aug 27 2007 12:00:00.000AM, since it for now doesn't
allow the 12 h-format together with milliseconds.

Reproduce code:
---------------
echo "TIME: ".strtotime("Aug 27 2007 12:00:00:000AM");
echo "TIME: ".strtotime("Aug 27 2007 12:00:00.000AM");
echo "TIME: ".strtotime("Aug 27 2007 12:00:00:000");
echo "TIME: ".strtotime("Aug 27 2007 12:00:00.000");
echo "TIME: ".strtotime("Aug 27 2007 12:00:00AM");
echo "TIME: ".strtotime("Aug 27 2007");
echo "TIME: ".strtotime("Aug 27 2007 12:00AM"); 

Expected result:
----------------
TIME: 1188162000 
TIME: 1188162000 
TIME: 1188205200
TIME: 1188205200
TIME: 1188162000
TIME: 1188162000
TIME: 1188162000 

Actual result:
--------------
TIME:
TIME:
TIME:
TIME: 1188205200
TIME: 1188162000
TIME: 1188162000
TIME: 1188162000 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44426&edit=1

Reply via email to