Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.68k stars 1.57k forks source link

[BUDI-7166] The date is not being saved correctly #10963

Closed alx25 closed 1 year ago

alx25 commented 1 year ago

Hosting

Describe the bug When I enter a date using the Date Picker control, for example 30-06-2023, when saving it in my data base(PostgreSQL), it is saved as the date 29-06-2023.

It is always saved with a one-day difference from the date I entered.

I have already checked the regional settings of my server, and they are correct.

To Reproduce Steps to reproduce the behavior:

  1. Add a date picker.
  2. Enter a date.
  3. Save.

Expected behavior If I select 30-06-2023 in my application, the date should be saved as such.

Screenshots

When I save

App Export Feriados-export-1687201800376.tar.gz

Desktop (please complete the following information):

From SyncLinear.com | BUDI-7166

mike12345567 commented 1 year ago

Hi @alx25 - if you set the timezone of your app/worker services, through the environment variable TZ within your docker-compose.yaml this will rectify the issue.

The timezone you set should be the same as the timezone in which your database is hosted - by default we will assume UTC, but this may not be consistent with the timezone the database is hosted within.

Timezone list can be found here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones e.g. Europe/London or America/Costa_Rica