...'s daylight saving time offset?

Hey Fam ! Can someone explain what is this more clearly lol ? thank you

…'s daylight saving time offset

The offset for daylight saving time in seconds. This will be zero if the time zone is not in daylight saving time at the current time.

Some example are welcome to illustrate because I really don’t understand what it is !!!

EDIT: Removed due to misinformation Apologies! I had actually never used this operator and was not familiar with it - should have researched it some more.

Refer to the below answer for by @boston85719 for an accurate and helpful answer.

2 Likes

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.

Screen Shot 2024-10-15 at 12.54.49 PM

Screen Shot 2024-10-15 at 12.55.08 PM

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.


Screen Shot 2024-10-15 at 12.56.46 PM

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.


Screen Shot 2024-10-15 at 12.59.21 PM

As can be seen above the EST and EST5EDT are not aware of daylight savings

Screen Shot 2024-10-15 at 1.00.50 PM

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.

Screen Shot 2024-10-15 at 1.04.51 PM

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.

Screen Shot 2024-10-15 at 1.06.44 PM

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.

3 Likes

Thank you guys for the explanation !