Jump to content
  • 0

Recognition of Timezones of users


Billp

Question

I have users in at least 4 and probably 5 different timezones.  If I sent a date/time of an event or meeting and I am in Arizona I want people in New York to see it at their time taking into account the 3 hour time difference in the summer and 2 hour time difference in the winter.  Normally I would store the date and time in UTC time (time - 7 in Arizona) and then the program would lookup the local systems timezone and add or subtract the right number of hours to the datetime stored in the table.  So New York users UI would display the stored time -5 or -4 depending on the time of year because the UI would lookup the local computers timezone difference.  Is that possible in Caspio?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

If you are sending the invite via email. I would create a task or trigger that will check your recipients location (maybe a field in your table) and create a logic that will add or minus the difference in hour to your UTC date before sending the invite.

For example. Lets say once of the recipients location is New York, the Task will check this location first and then minus 4 hours to your UTC date. 

image.png.d32dcb3341f70532d49b296e82753424.png

Link to comment
Share on other sites

  • 0

That can work but it also needs to deal with Daylight Savings Time, which I get can be done.  Then if someone comes on in Hawaii I have to create another one.  And there is Arizona which doesn't do daylight savings time which also has to be dealt with.    All I would really need would be a function in Caspio that captured the local, current timezone offset from the users machine.  I wonder if I can do that in Javascript?

Link to comment
Share on other sites

  • 0

So I am just making my way through JS but I found the getTimezoneOffset() function that reads your local time from your computer and then tells you the minutes you need to add or subtract to get to UTC.  No need to send what your timezone is it get's it from the machine.  I'm going to see if I can create a small function that will allow caspio developers to seamlessly (almost) store in UTC time and retrieve in local time from whereever they are.  If I get it done I'll post the code.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...