How to make a change 10 minutes in the future for various time zones?

I’m trying to create functionality where a button is disabled after 10 minutes of doing some action. But how would this work with users in different time zones? If I use the thing’s creation date, is that the creation date in the apps timezone? Using that in combination with the “current date/time”, which is the time of the user, wont work. Any ideas on how to tackle this?

A date is a point on time that is universal for all observers. Timezones have nothing to do with these points in time and when they have happened, are happening, or will happen. 10 minutes from some date is just that date plus 10 minutes.

Timezones are only relevant for date formatting. So what date/time it is now, where I am, might be represented differently by me versus how you would write it. But it’s the same moment in time (that we might call “now”).

You can learn more about what dates are, date construction, and date formatting here:

(Only a bit of this info is out-of-date: Bubble has arbitrary date construction now and for a time had features that made “parallel date” construction easier, but this will likely help you get your head around the basic concepts.)

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.