note 117462 added to datetime.createfromformat

From: Date: Fri, 12 Jun 2015 15:09:45 +0000
Subject: note 117462 added to datetime.createfromformat
Groups: php.notes 
Request: Send a blank email to php-notes+get-202852@lists.php.net to get a copy of this message
To convert an email header date use the following (important, notice the * at the end) $date = DateTime::createFromFormat('D, d M Y H:i:s O *', $email_date); Some dates in email headers can be formatted as: Fri, 12 Jun 2015 13:53:37 +0000 (UTC) The "(UTC)" at the end of the date causes an error and will return a result of false unless the * is at the end. ---- Server IP: 72.52.91.14 Probable Submitter: 92.26.83.112 ---- Manual Page -- http://php.net/manual/en/datetime.createfromformat.php Edit -- https://master.php.net/note/edit/117462 Del: integrated -- https://master.php.net/note/delete/117462/integrated Del: useless -- https://master.php.net/note/delete/117462/useless Del: bad code -- https://master.php.net/note/delete/117462/bad+code Del: spam -- https://master.php.net/note/delete/117462/spam Del: non-english -- https://master.php.net/note/delete/117462/non-english Del: in docs -- https://master.php.net/note/delete/117462/in+docs Del: other reasons-- https://master.php.net/note/delete/117462 Reject -- https://master.php.net/note/reject/117462 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#202852) next »