I have written a simply vb.net application that will store and display data from my mySQL net database. I also have on online form that allows users to input data into this database as well. When I enter data from the vb.net program it is formatted as follows:
CREATE_DATE CREATE_TIME
12/8/2007 12:02 PM
When a user input information from the web form, it comes into the database formatted like this:
CREATE_DATE CREATE_TIME
2007/12/08 13:02:32
It seems as if the time being input from the web is an hour off of my actual time. I am assuming it is a timezone issue. Is there a way to remedy this? I am pretty new to PHP. Here is code I am using to do this:
[code=php]
<?php
} else {
$user_name = $_POST[‘user_name’];
$password = $_POST[‘password’];
$create_date = date(‘Y/m/d’);
$create_time = date(‘H:i:s’);
mysql_query(“INSERT INTO `Valid_User` (user_name, password, create_date, create_time) VALUES (‘$user_name’, ‘$password’, ‘$create_date’, ‘$create_time’)”);
echo “Your request has been added!”;
echo ‘<meta http-equiv=”refresh” content=”5;url=http://customdesignsource.com/Auth.php”>’;
}
?>
Formatting the date is a simple fix – I can take care of that. I did a little bit of searching on the “time offset” issue, but I can’t find anything.
Any help would be appreciated!