Mervli Türkmen Mervli Türkmen - 2 months ago 6x
PHP Question

standart time for my website

I want to supply my site with standard time for prevent confusion. I simple use this code

time ();
for getting time. But this function uses system's time. How can I make standard time for all users which is independent from computer's time.


You need to set the default time/zone which is then used by all date/time functions in your script


$current_date = date('d/m/Y == H:i:s');

It would be advisable that you set this in your php.ini file but the fact your asking something so basic I guess you're on a shared host and don't have access to the ini file so the code above is fine.