I am using Debian 8, mariadb 10.4, nginx 10.3, php7.3-fpm. My timezone configuration was like this:

  1. Debian: Europe/Athens ( through tzselect command )
  2. PHP: Europe/Athens , Default timezone UTC
  3. Mariadb: Europe/Athens

The problem:

My records where inserted on DATETIME fields with UTC timezone ( 3 hours earlier).

I guess it the default timezone on php that makes the problem, but I don 't know how to solve it.


DATETIME is like taking a picture of your local clock.

Check these:



If NOW() does not show Athens time, then something is set incorrectly.

  • It is Athens time but I chanded my post because I was wrong thinking I solved the problem. See my update question. Thanks for your answer – Christoforos Jul 30 '19 at 18:10

Finally I think nothing is wrong. The records are inserted in the database in utc time, but my application is configured for my time zone. So when using the dates from the db it haw the informatoin for timezone and shows the correct hour.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.