View Full Version : Comments Date Stopped Working
Elton
01-13-2007, 02:31 PM
http://www.sacn.org.uk/
For some reason, the date of any comment posted now comes up as:
Posted on December 1, 2006, 1:01 pm
Any idea what may be wrong?
shketuljko
01-15-2007, 02:21 PM
Try to find this function in Article.class.php in Class/ directory in your home directory of vivvo site.
function AddArticleComm($comment)
{ global $HTTP_SERVER_VARS;
// $time=date("Y-m-d H:i:s");
$time=date("YmdHis");
$id=$this->Id;
$comment=clear_bad_words($comment);
$author=clear_bad_words($_POST['comments_author']);
$email=clear_bad_words($_POST['comments_mail']);
$ip=$HTTP_SERVER_VARS[REMOTE_ADDR];
$query="Insert into tblComments (article_id,description,create_dt,author,email,ip)
values ($id,'$comment','$time','$author','$email','$ip')";
$result=mysql_query($query) or sql_error($query, "Bad query add article");
}
Check this and tell me if you have a identical code.
NOTE:
Heed on the code $time=date("YmdHis");
Your possible problem is date() function. (maybe doesn't compatible with your server configuration)
You can see about date() function on this url:
http://www.php.net/manual/en/function.date.php
Elton
01-15-2007, 04:15 PM
The file's ok, so is the date() function as that's been tested with
<?php
echo date("Y-m-d H,i,s");
?>
So it's something else :(
shketuljko
01-16-2007, 12:02 PM
OK.
When You tested function what is result?
It's correct date or wrong?
Elton
01-17-2007, 11:47 PM
It works fine when the function is tested :(
shketuljko
01-18-2007, 08:24 AM
Please open a ticket on support forum with your ftp access and admin access for administration of vivvo, so we can see the files and fix this problem as soon as possible.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.