Hello all Quick question ... Im using the date("H:i") function to record the time of users posting messages but it always shows a time 53 minutes fast. Does time get its setting from my computer or a server somewhere ? Thanks Al
u can use this function like that: <?php $hr=date('h'); $da=date('i'); $se=date('s'); print($hr.":".$da.":".$se); ?>
Regards Farhan
Thanks but i still get the same wrong time The time on my computer is 11.52 with that code i get 12:45:07 ..... any one have any ideas ? Thanks Al
I cannot test this but give it a go.
echo "It is now " . date("h:i", mktime()-3180);
All time/date functions are getting the current time from the server's CMOS clock. If your host is in a different timezone than you, then all time/dates will be off from your clock. You can easily compensate for this by adding/subtracting seconds from UNIX timestamps.