Guys,

I'd like to integrate this note as an example to this function, what do you
think?


Thanks,
Thiago
---------- Forwarded message ----------
From: <[EMAIL PROTECTED]>
Date: Tue, Jul 22, 2008 at 9:56 PM
Subject: [PHP-NOTES] note 84633 added to function.strtotime
To: [EMAIL PROTECTED]


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

Reply via email to