note 126673 added to class.datetime

From: Date: Fri, 10 Dec 2021 07:09:52 +0000
Subject: note 126673 added to class.datetime
Groups: php.notes 
Request: Send a blank email to php-notes+get-217347@lists.php.net to get a copy of this message
if you create a new DateTime from a database with typically Date field, if the default value is 0000-00-00 de real value of the variable don't set to 0000-00-00 Example: $date = new DateTime ('0000-00-00'); print_r($date); Result: DateTime Object ( [date] => -0001-11-30 00:00:00.000000 [timezone_type] => 3 [timezone] => Europe/Berlin ) ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 2.139.227.21) ---- Manual Page -- https://php.net/manual/en/class.datetime.php Edit -- https://main.php.net/note/edit/126673 Del: integrated -- https://main.php.net/note/delete/126673/integrated Del: useless -- https://main.php.net/note/delete/126673/useless Del: bad code -- https://main.php.net/note/delete/126673/bad+code Del: spam -- https://main.php.net/note/delete/126673/spam Del: non-english -- https://main.php.net/note/delete/126673/non-english Del: in docs -- https://main.php.net/note/delete/126673/in+docs Del: other reasons-- https://main.php.net/note/delete/126673 Reject -- https://main.php.net/note/reject/126673 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217347) next »