Datetime not correct

Hi,

I have a very weir problem.

From a debian 12 server, i push from a python script a datetime :
import datetime
now = datetime.datetime.now()
timestamp = now.strftime(“%Y-%m-%d %H:%M:%S”)

I push timestamp into my Baserow api hosted on a container inside an ubuntu server.

If its 17:30 when i trigger the script, my debian server (pusher) sur 17:30. My ubuntu server is 17:30. My docker is 17:30, my baserow api dispaly 18:30.

How can i fix it ?

Hi,

Is it possible that it has something to do with a daylight saving time setting since the time difference is always one hour?

maybe, but i dont unedrstant why if my time zone is correctly set up in all the systems hosting my services.

Is there any setting inside baserow seting it up?

@davide could you please check this out?

Hello @Matteo,

Please note that the Baserow API uses UTC as the timezone for timestamps. This means that if you want to see the correct time in the UI, you need to convert your timestamp accordingly.

If you provide a timestamp in a different timezone, such as Europe/Rome, Baserow will consider it as a UTC timestamp. The UI will then convert it to the Europe/Rome timezone based on your browser timezone. During certain periods of the year, this will result in an hour being added to your timestamp. During daylight saving time, two hours will be added.

To avoid these issues, it is recommended that you use datetime.utcnow() instead of now to generate a timezone-aware timestamp.

1 Like

Thanks you for the information.