Displayed Data is not the same as Modifying the Data

So I am requested to update erroneous information in our database, so upon switching to live database, I noticed that the display and the actual data are not similar. Please take a look and provide corrections to the issues:

Before the edit function:

Upon going to edit function:

Notice that the actual data upon which I am going to edit is not the same as the one displayed prior to editing. Additionally, the in-app display appears to show the same data as the one displayed before the edit function.

Even after editing, and making changes, both displays appear to be unchanged.

The differences between the two start dates and the difference between the two end dates are the same, 15 hours.

So I am guessing it has to do with time zone setting.

Were both times added with the same datetime picker input element? Was it done by the same person? Are both screenshots from the same person?

Hello @chikeiroegbu

The intention of the user was to add the start date /time at 8:00 AM, and the end date/time at 6:30 PM. So, the data saved in the database is correct. However, the display appears to be different from the saved date. This is what bothers me. Because it has not yet happened to me, that both saved data and dispalys are not the same.

Bubble converts saved dates to UTC.

So if person A is in UTC+2 and picks 4PM is a datetime input, it will be saved as 2PM UTC. If person B is in UTC -5 and selects 4PM in the same datetime input, it will be saved as 9PM.

Bubble also displays dates based on the current users time zone, so if person A is to check the 5PM that person B selected, they see 11PM, which 9 (the UTC value that was stored) plus 2(the UTC offset for person A’s time zone)

If you want all the date/time to be for just one time zone, you will have to specify that to Bubble.

Did that help?

Thanks for your speedy reply @chikeiroegbu This will allow us to narrow down our resolution to the timezones!

However, I’d like to ask further since before, the same expressions and elements were used, and we have had no issues with this. It is only recently, perhaps a month or two ago, that we started noticing this issue. We’ve been using this setup already for over 1 year.

Okay, that’s certainly unusual. My only guess is that someone made the changes from a different time zone in this scenario.

Unless there’s a workflow that adds a certain number of hours to your saved date.

You can confirm the time zone thing by asking someone in a different time zone from you to pick a date with the date/time picker responsible.

I think this is the timezone issue. How should the date/time be saved, or expression constructed to show both persons timezone properly?

You can override the default time zone settings and choose the time zone you want all date/time values to be stored in.

Bubble will still convert the values to UTC in the DB.

Before if two people A and B in UTC+1 and UTC+2 respectively pick 3PM in a date/time picker, the UTC values stored in Bubble will be 2PM and 1PM respectively. But now if you override the controls and select all time zones to be UTC+2, then Bubble will store the same 1PM UTC for both persons regardless of their current location’s time zone.

Yes, the timezone is at override setting. Then I selected the date-time inputs.

Are you asking a question or showing that the solution worked for you?

I’m persisting with my inquiry, brother, because even though I’ve already configured the settings, it seems that the time and date are not being overridden.

@chikeiroegbu I checked the timezone in my Macbook, make sure it’s using the proper timezone. Computer has correct timezone. However, I noticed that my Google Chrom seems to be on L.A. timezone. A quick google would tell that Manila Philippines and L.A. / America has 15-hour difference. Seems to be correct as the data in my bubble app shows the same 15-hour difference.
Apparently there are issues with Mac’s new OS.


After checking the boxes, you’ll have to do one or both of these as well.

  • The first one, if you intend to do the override at page level, you’ll set the time zone you want.
  • The second, if you intent to do the override in teh datetime picker, you’ll set the time zone you want.

Oh, okay. That’s definitely weird.

Can you double check if the clock on the mac shows the correct/current time of the location you’re in?

Yes, it is correct. But this is what I am seeing the in DevTools of Google Chrome I am using with/ Mac.

My Mac is using Manila, PH as the location, but Google Chrome is getting this timezone. This is a 15-hour difference. When I run my workflows, I also see a 15-hour difference between my Manila timezone, and the data saved in bubble.io, which leads me to thre conclusion that indeed, the browser is getting an incorrect timezone versus the computer.

I tried manipulating the timezone to Manila, Philippines in the sensor of Google chrome.
Screenshot 2023-10-10 at 22.13.18

Then from here, I did try to run my workflows, and it appears to work exactly without the 15-hour difference.

@chikeiroegbu But I noticed that even if I correct the timezone in the browser, the modified date remains with a 15-hour difference, not UTC less 8 hours since Manila Philippines is +8 hours

Just to clarify:

  • Your mac time zone is set to Manila, Philippines (and your mac shows the correct time for Manila Philippines) but chrome inspect says you’re in LA time zone instead?

The last two screenshots I shared, can you share the one for your app? The time zone in the date/time picker and the time zone of the page (if it was checked)

@chikeiroegbu That is correct. I compared the Safari and Google Chrom DevTools and this shows:
Safari:
Screenshot 2023-10-11 at 12.39.32
Google Chrome

@chikeiroegbu How about in the workflow? the field is a date thing, the data is ‘current date/time’, but registered a different time?

Screenshot 2023-10-11 at 13.56.48