I don’t think this operator works on dates, as it is listed under Geographic Address in the manual and is not available after a dynamic expression that uses a Date data type, and is only available when using a geographic address data type.
@Sarah_Esteve In my opinion, it is not a fully realized function, in that it doesn’t really do that much for us straight out of the box and would take a cumbersome approach to make use of it.
For example, a geographic address (the only data type this operator is available for) that is set to a location in USA East Coast, has the below values exposed from ‘time’ operators associated with the Geographic Address.
The timezone ID of America/New_York is the most useful thing exposed here as that is actually the timezone that Bubble has available to manipulate Dates, that is actually Daylight Savings Aware.
The other two timezones for USA East Coast of EST and EST5EDT are not really daylight savings aware, as they are basically the static version of the timezone, where EST is not Daylight Savings and EST5EDT is Daylight Savings, since USA East Coast will be -4 UTC with not daylight savings and -5 UTC with Daylight Savings, hence the EST5EDT, Eastern Standard Time 5 Eastern Daylight Time.
As can be seen above the EST and EST5EDT are not aware of daylight savings
America_NewYork is Daylight Savings aware, which should be used. I’m actually glad that is the ID Bubble exposes rather than EST or EST5EDT since it is daylight savings aware.
If you were to simply take the daylight savings offset value of 3600, and save that to the DB and then use that at then end of expressions to manipulate the date, you’ll get wrong times…since you’ll only be correct half the year.
To make use of the Timezone ID, save that to the DB as a text field and Use that in the Format operator on a date and set the dynamic timezone to that value.
To take this further and get the text value (ie: format operator turns dates to text) you can use some custom code to convert the text to an actual date object again if it is needed in some processing, or just leave it as text if it is just for display.
Keep in mind you need to enable these settings
These settings are one of the best new features Bubble has released in the past couple of years to make working with dates and time zones easier.