From:             tommibi at gmail dot com
Operating system: Linux Debian x86_64
PHP version:      5.2.4
PHP Bug Type:     Date/time related
Bug description:  DataTime::format(): not well formated data '0000-00-00 
00:00:00'

Description:
------------
there is something wrong with date format. I'm using DataTime object in
Propel script and this date ('0000-00-00 00:00:00 ') is given from
database. when i try use it DataTime object it display "-0001-11-30
00:00:00"

Reproduce code:
---------------
<?php
$dt = new DateTime( '0000-00-00 00:00:00' );
var_dump( $dt->format( 'Y-m-d H:i:s' ) );
?>

Expected result:
----------------
string(20) "0000-00-00 00:00:00"

Actual result:
--------------
string(20) "-0001-11-30 00:00:00"

-- 
Edit bug report at http://bugs.php.net/?id=42971&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42971&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42971&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42971&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42971&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42971&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42971&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42971&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42971&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42971&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42971&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42971&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42971&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42971&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42971&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42971&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42971&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42971&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42971&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42971&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42971&r=mysqlcfg

Reply via email to