mysql - Changing timezone in PHP not working -
this script makes entry orders
table. time beingness inserted table not beingness displayed local time!
//retrieve variables $tablenum = $_post['tablenum']; $covernum = $_post['covernum']; //get date & set time zone date_default_timezone_set(europe/dublin); $date = date("y-m-d h:i:s", time()); //construct query & execute $sql = "insert orders (covers, `table`, placed) values ('$covernum', '$tablenum', '$date') "; $result = mysql_query($sql) or die(mysql_error()); $numrows = mysql_affected_rows();
can suggest way can go fixing code display europe/dublin? column in table timestamp
.
with above code output this:
21/02/2013 - 14:30
should this:
21/02/2013 - 21:30
many thanks!
i think need add together quotes around europe/dublin
date_default_timezone_set('europe/dublin');
php mysql timestamp
No comments:
Post a Comment