Hi, i tried this function
$date = date('m/d/Y h:i:s a');
but it is difference in the date of my PC...how can i get the system date of my PC.
THank you in advance.
Is your PHP code running on your PC, or from a server?
Hi fretburner thank you for the reply,...running from my PC
PHP only gives the time of your server. You need JS to get the time of the user's computer. E.g.
If you want to make sure that your local server (on your PC) is displaying the right time, check that you have the correct timezone set for PHP.
You can change the global default for your system in your php.ini file (look for ), or you can set in on a per-script basis with the date_default_timezone_set function:
You can check PHP's list of supported timezones to find the correct setting for your location.
Hi ralph, thank you for the reply,Okay so i cannot get the time of pc if i use the date function...Okay i will try this thank you for this
Hi fretburner, Okay i will try this thank you again.
Hi fretburner, Thank you so much for helping me..it's working it coincide now to my PC...:) :nanaman:
Try this code
echo date('m/d/y h:i a', time());
This topic is now closed. New replies are no longer allowed.