Fwd: [PHP-NOTES] note 84633 added to function.strtotime

From: Date: Wed, 23 Jul 2008 00:51:27 +0000
Subject: Fwd: [PHP-NOTES] note 84633 added to function.strtotime
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969379147@lists.php.net to get a copy of this message
Guys, I'd like to integrate this note as an example to this function, what do you think? Thanks, Thiago ---------- Forwarded message ---------- From: <rohanshenoy@w3hobbyist.com> Date: Tue, Jul 22, 2008 at 9:56 PM Subject: [PHP-NOTES] note 84633 added to function.strtotime To: php-notes@lists.php.net This function can be used to convert the timestamp generated by MySQL NOW() function into UNIX timestamp. Example: Lets say MySQL NOW() returns '2008-07-23 06:07:42'. <?php $mysql_now='2008-07-23 06:07:42'; $time=strtotime($mysql_now); echo date(d M y, H:i:s,$time); //outputs: 23 Jul 08, 06:07:42 ?> Please note that the timestamp returned by mysql NOW() function may be the in the timezone of the server on which it was generated, and not always in GMT. ---- -- Thiago Henrique Pojda

« previous php.doc (#969379147) next »