johntp Posted September 1, 2007 Share Posted September 1, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/67570-solved-wrong-date/ Share on other sites More sharing options...
d22552000 Posted September 1, 2007 Share Posted September 1, 2007 do date \3600 *-6 Quote Link to comment https://forums.phpfreaks.com/topic/67570-solved-wrong-date/#findComment-339415 Share on other sites More sharing options...
johntp Posted September 1, 2007 Author Share Posted September 1, 2007 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 ? Quote Link to comment https://forums.phpfreaks.com/topic/67570-solved-wrong-date/#findComment-339418 Share on other sites More sharing options...
johntp Posted September 1, 2007 Author Share Posted September 1, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/67570-solved-wrong-date/#findComment-339420 Share on other sites More sharing options...
hitman6003 Posted September 1, 2007 Share Posted September 1, 2007 $Commentdate = date("M j, Y, g:i a T", mktime() - (3600 * 6)); Quote Link to comment https://forums.phpfreaks.com/topic/67570-solved-wrong-date/#findComment-339440 Share on other sites More sharing options...
johntp Posted September 1, 2007 Author Share Posted September 1, 2007 Thanks alot guys problem solved Quote Link to comment https://forums.phpfreaks.com/topic/67570-solved-wrong-date/#findComment-339442 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.