Timestamp off by 10 minutes
I have been using the same code for quite some time and just recently it is off by 10 minutes. I am using the following code to put into a mysql table (varchar).
Can anyone help me to get the time back on track. I have even tried to set the time zone.
<input type="hidden" name="timestamp" value="<?php echo date('g:i a'); ?>" />
This would pull from whatever time the server is set to. You may want to contact your host.
I'm always up for networking with fellow web professionals. Connect with me on LinkedIn
if you like!
Can you expand on what "off by 10 minutes" means?
You're capturing a generic time in "hh:mm am" format. What are you comparing it to, that says you are off by 10 minutes? When are you comparing it when you find that it's 10 minutes off?
As cbVision mentioned, because you don't specify a timestamp, it's using the server's clock. Is "Your" clock 10 minutes off of the "server's" clock?
Originally Posted by php.net
Where is your server host?
... and please remember to wrap code with forum BBCode tags:-
[CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]
If you can't think outside the box, you will be trapped forever with no escape...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)