Time settings show incorrectly in email - Changing default time from GMT to EDT?

I’m getting a strange error related to the date/time selector.

In the application, the user is selecting a start date/time and finish start/time for an appointment.

This information is used in a script later in the application, a calendar invite is sent out and an email is sent out.

Both the calendar invite and script later in the application are correct.

Here’s the script later in the application.

However, in the email, the times are +4 hours.

Any idea what’s going on? Could this be in my email setting?

Ok, I’ve tracked down the issue. It looks like bubble by default is using GMT. I need to set it to EDT.

Any ideas on how to do this?

I double checked the database, and these times are correct. They are in my timezone EDT.

See the bottom record here. 11am to 1pm March 31st.

This makes me think it has something to do with the email client reading it incorrectly?

I solved the problem with the emails in the short term by adding negative 4 hours.

However, this is not a great long term solution. Would love some help with this. I feel like I’m missing something easier here.

1 Like

Instead of modifying the time, try formatting the datetime to use a particular timezone. Which one to pick may need to be dynamic if you have users in different timezones, you may need to save the user’s timezone for use later if the email is being sent from a scheduled workflow or API endpoint workflow.

@mishav Thanks.

The time is being formatting correctly to the database itself. I double checked this.

It will also show correctly if I query the database to show in other places in the application.

However, the issue is that when it’s emailed to someone in EDT (I haven’t tried to email to people in other time zones), +4 hours gets added to the time.

Here’s another strange thing. When I use the time stamps to send a calendar invite. Google will recognize the event correctly (see the top of the image where it says “when” the time is 10am to 12pm) but when you look into the bottom event description 4 hours have been added to the start and finish time and it’s not an event from 2pm to 6pm

1 Like

Internally, the time is stored in UTC timezone. It is then formatted to your local timezone from the browser whenever it is displayed, including the data editor.

The email also formats to a timezone, but as an email is sent by the server and the user could be anywhere, including multiple users in multiple timezones, it doesn’t pull the timezone from the browser like you are seeing everywhere else. UTC is default, and you can override that with the formatting option.

The timezone is showing as UTC, so this adjustment sounds correct. Do you have any formatting options on the start and end time at the bottom?

Thank you. I’ll look into this in the future. My current solution is a bit of a hack, but works for now, so I’ll leave.


Any recommendations for what calendar invite plugins to use???

Also, if you’re still living with your hack, perhaps the timezone converter I built could help you not do math for every timezone.

You can test it directly here: Open Block for Converting Timezones

The parameters for your set up likely are:
From time = UTC (this is what Bubble sends)
To Time = Users timezone in ISO format
Format DateTime = Time to be converted in as yyyy-mm-dd"T"HH:MM:ss"Z" set with users current timezone.
Bring the datatype back in as “date” not “text”

In this thread we also test the time/date problem, including a test app from the user mishav: