I have this issue, I’m using a date picker (calendar picker) but when I select a date it’s taking the same date minus 1 day.
i.e: If I choose 07/dec/2022 my selected date value is set to 06/dec/2022.
I’ve tried to set a timezone in the SELECTED VALUE property but I get the error: “The binding requires an inversible formula”
My formula:
FORMAT_DATETIME_LOCAL(SET_TIMEZONE(DATETIME(appVars.vdate1), “Etc/GMT-4”) , “DD.MM.YYYY”)
The problem may be caused by the time zone you are using. The “Etc/GMT-4” time zone is a UTC-04:00 time zone, which means it is four hours less than Coordinated Universal Time (UTC). If you are in a time zone that is four hours less than UTC, then the selected date will be displayed correctly, but if you are in a time zone that is more than four hours less than UTC, the selected date will be displayed as if it were in the “Etc/GMT-4” time zone, which is one day less.
To fix this problem, you can try setting the correct time zone for your location. To do this, you can use the SET_TIMEZONE function and pass it the time zone for your location as a parameter. For example, if you are in the Santiago, Chile time zone, you can use the “America/Santiago” time zone as follows:
Hi,
Thanks for your response.
I tried before setting local time zone and others time zones but the bug persists.
And btw, my current time zone is GMT-4, I’m in Dominican Republic.
I modified the PICK DATE FLOW to add one day to the date, it’s an unorthodox but it does the trick.
I use NOW() for my default date, but remember that the user can change the date in the calendar.
Anyway, I submitted the bug and the appgyver Team is checking it.
I have now tried looking deeper into this issue. To begin with, I have instructed the “Date picker calendar” component to put the date and time into a page variable that is then displayed next to the Headline. Then after testing on web preview, I get this (It works just fine):
Hi! Figured out this was due to the NOW() formula always returning UTC timezone. Used SET_TIMEZONE and LOCAL_TIMEZONE so that there would not be a problem with this and the date would appear correctly. This update will be out in the next release.
@Mevi I tried follow what you say, but when I save the date, for example: I choose in the pick date 10.02.2023(Im from Brazil São Paulo) in the backend (Firebase) returns to me 09.02.2023. I tried to use any formulas, for example: SET_TIMEZONE(appVars.app_DataEvento, “America/Sao_Paulo”) or SET_TIMEZONE(appVars.app_DataEvento, LocalTimezone()), and any one save the date that I choose( 10.02.2023)
Hi! Check the output of the date field (without formatting it) – it should come with a timezone attached at the end, -05:00 or something similar for you. Then check if the backend keeps that timezone or if it converts it or drops it somehow.