0

I am using NOW() and the 'datetime' data type. Getting correct date but incorrect time. Like 50 mins earlier time from the current time.How to save the accurate time of the time zone.

eg: SELECT NOW() This query gives 2021-08-19 17:40:17. But the actual time in my zone was 2021-08-19 17:45:17

Does anyone have any idea why this five minutes difference occurs?

1 Answers1

0

It was a problem with the MySQL machine. It is five minutes slow. Solved the issue by adding five minutes in the insert query. now() + interval 5 minute