note 57052 added to function.mktime
| From: | alborz at myweblog dot com | Date: | Thu, 22 Sep 2005 12:16:44 +0000 |
| Subject: | note 57052 added to function.mktime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95602@lists.php.net to get a copy of this message | ||
This is how you would convert a MySQL datetime to RFC 822 for RSS
$breakup = $row->date;
list($date, $hours) = split(' ', $breakup);
list($year,$month,$day) = split('-',$date);
list($hour,$min,$sec) = split(':',$hours);
$date = date(r,mktime($hour, $min, $sec, $month, $day, $year));
----
Manual Page -- http://www.php.net/manual/en/function.mktime.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57052
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57052&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57052&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57052&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57052&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57052&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57052&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57052&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57052&report=yes
Search -- http://master.php.net/manage/user-notes.php