Hi,
Is there a way (or any component, internal or external) that can be used to get the timezone or the UTC offset of the device/user?
Cheers,
Fred.
Hi,
Is there a way (or any component, internal or external) that can be used to get the timezone or the UTC offset of the device/user?
Cheers,
Fred.
Hi @Fred,
Try this script with the Abitrary JavaScript component :
var first = (new Date().toTimeString().slice(9));
var second = (Intl.DateTimeFormat().resolvedOptions().timeZone);
var third = (new Date().getTimezoneOffset() /-60);
var full = first + "," + '\xa0' + second + "," + '\xa0' + third
return full;
How to download the Abitrary JavaScript component : PragmaFlow's Adalo Marketplace Reopened - YouTube
Thank you
Hi @Fred ,
An alternative way than @dilon_perera 's way.
Add 2 properties in users collection:
have an action update logged in users with these properties with Start of Today,
then use custom formula to get the timezone,
The result would be,
To eliminate fraction, use INT()
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.