Question

From Users

PHP date and time issue

Details

In php I set

date_default_timezone_set("Asia/Calcutta");  

My system timezone is (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi

Both are same.
But when I change the system date and time , the PHP returns the same date and time as sytem date and time .
ie) When I set system time as 2013-07-10 11:00:00, then PHP date function returns the same date time as 2013-07-10 11:00:00. But the actual time is different.
I want the actual date and time from php not system date and time.
How can I implement this? If you have any idea please share.

Answers

    A= 1
    Answer

    As you are working on local host, the PHP take the current time and date from the local system settings. When you hosted in internert it will work properly.

Give  Answer

Login for give Answer