Time / Date Handling
Posted: Wed Apr 22, 2009 2:17 pm
im trying to build a script that keeps a Log of events. the log has the following fields
(postname, post_time , post_id)
when a post is made i call the function belowand then
$post_time is inserted into MySql DataBase.
Now how shud i retrieve / display the post_time variable with the actual time of post ?
There is no need of TimeZone functionality for this script because the script will be used Locally only. Any suggestions or examples will be helpful
(postname, post_time , post_id)
when a post is made i call the function below
Code: Select all
function create_date()
{
$today = date("D M d, Y H:i:s");
$format = $today;
return $format;
}
Code: Select all
$post_time = create_date();Now how shud i retrieve / display the post_time variable with the actual time of post ?
There is no need of TimeZone functionality for this script because the script will be used Locally only. Any suggestions or examples will be helpful