Problem on retrieving DATE from mysql

Hi, anyone also encounter this issue? I have a DATE column in mysql for date of birth (let’s say the value is 2019-11-25) and every time i retrieve this using query builder, I’m getting 2019-11-24 which is the previous date from what is in my database.

1 Like

Make sure that the Timezone is configured for mysql also in your computer, this is probably not related to Adonis.

Algo try with SELECT NOW(); <- query to see the database time,
remember also there is some mysqldbclients that set the timezone in the connection/pool session…

Check this link for more information

SET time_zone = 'UTC'

remember UTC is +4 hours ahead of EST.


1 Like