Server Timestamp

hello everybody
I would like to show a text message when a certain date or time is satisfied. i.e when is the 1 january of the year.
Using the current date time, it looks like it saves the time/date based on the user browser. So if the user changes the time and the date on his browser , ihe will be able to see the text before than the prescribed date.
How can I avoid that? In order to use an absolute universal time, or using the bubble server timestamp?

One way to do this is by setting the page timezone to the server timezone (UTC)

But a better approach that I would take would be to use the :extract operation on the current date/time value.

So to check if the current date/time is on the 21st of October 2022, I’d run a conditional like:
current date/time :extract date (set the timezone here) is 22 and current date/time :extract month (set the timezone here) is 10 and current date/time :extract year (set the timezone here) is 2022

A slightly long condition but it works like a charm. Plus you can refine the condition down to hour, minute, day of week, etc as well

Ranjit from Atomic Fusion

Explore and reuse the community’s Bubble assets & Accelerate your Bubble development with Atomic Fusion

1 Like

thank you!

1 Like

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