Different UTC date between laptop and server

Hi everyone,

I’m working currently on a project with Strapi (4.8.1), I use my laptop as dev and I have a VPS server that host strapi in production.

For convenience even my configuration on my laptop hit the mysql server (VPS) so I have the same data and same configuration.

The issue I have is when I call any endpoint that returns datetime I have an incorrect datetime on my laptop : 2023-05-05T13:45:00.000Z

And a correct datetime on the server : 2023-05-05T15:45:00.000Z

So I understood it is relative to the timezone configured on the server but how can I force same configuration in my locahost ?

Thanks for your help

Answering my own question, I have to force utc timezone in the config of the connection :
timezone: ‘utc’
I don’t know why, documentation said that utc is the default setting but it appears that it used in fact the system timezone.

1 Like