Current server time is
[me@unknown ~]# date
Fri Feb 24 14:53:41 MYT 2012
When I echo date('Y-m-d H:i:s') the date time is 2012-02-24 06:53:46. The hour, minute & second is not same.
How do I get same date with server time in PHP?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Set the timezone for
MYTbefore getting the date, e.g.:Also see this example.