Badr Hari
Badr Hari

Reputation: 8374

Difference between MySQL NOW() and PHP date('c')

What is the difference between them? If I use them both on my local machine (windows, xampp), the difference between them is one hour. Why?

Upvotes: 3

Views: 1911

Answers (2)

oezi
oezi

Reputation: 51797

there's no difference, but you might have configured different timezones for both (or one of them doesn't use daylight saving time). please check your...

Upvotes: 2

Shakti Singh
Shakti Singh

Reputation: 86336

You are probably having different timezone for PHP and MySql. You need to set the same timezone for both to get the date time without any difference

Upvotes: 3

Related Questions