|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-10-16 20:43 UTC] johannes@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 22:00:01 2025 UTC |
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"