Jump to content

[SOLVED] Wrong Date!


johntp

Recommended Posts

OK. I have this script, and you can post a comment. Well it's all fine except the date stamp is GMT and i am GMT -6. I can't figure out how to do this here is what is used for the script.

 

<? session_start();
require_once("include/config.php");
$lastlogin=$_SESSION['lastlogin'];
$userId=$_SESSION['user_id'];
$Commentdate=date ("M j, Y, g:i a T");
$eventID=$_POST['eventId'];
$usereventComments=$_POST['comment'];
$queryeventsrsvpcomments="Insert into userrsvpeventcomments (eventpostedid,commentsposteduserid,userrsvpcomments,commentsdatetime) values('$eventID','$userId','$usereventComments','$Commentdate')";
mysql_query($queryeventsrsvpcomments);
header("location:dsiplayeventsdetails.php?edi=$eventID");
?>

 

can anyone plz help me out I have been googling for an hour and have found no resolution

Link to comment
https://forums.phpfreaks.com/topic/67570-solved-wrong-date/
Share on other sites

where at?

 

<? session_start();
require_once("include/config.php");
$lastlogin=$_SESSION['lastlogin'];
$userId=$_SESSION['user_id'];
$Commentdate=date \3600 *-6 ("M j, Y, g:i a T");
$eventID=$_POST['eventId'];
$usereventComments=$_POST['comment'];
$queryeventsrsvpcomments="Insert into userrsvpeventcomments (eventpostedid,commentsposteduserid,userrsvpcomments,commentsdatetime) values('$eventID','$userId','$usereventComments','$Commentdate')";
mysql_query($queryeventsrsvpcomments);
header("location:dsiplayeventsdetails.php?edi=$eventID");
?>

Like that ?

Link to comment
https://forums.phpfreaks.com/topic/67570-solved-wrong-date/#findComment-339418
Share on other sites

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /mounted-storage/home23b/sub003/sc21754-QIFR/maasoe.com/addrsvpeventscomments.php on line 5

 

Parse error: syntax error, unexpected T_LNUMBER in /mounted-storage/home23b/sub003/sc21754-QIFR/maasoe.com/addrsvpeventscomments.php on line 5

 

is what happens when i try it like above

Link to comment
https://forums.phpfreaks.com/topic/67570-solved-wrong-date/#findComment-339420
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.