Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6242065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:53:00+00:00 2026-05-24T11:53:00+00:00

I have my users set their timezone in their preferences but we also attempt

  • 0

I have my users set their timezone in their preferences but we also attempt to grab a GPS coordinate from the browser on each interaction. I would like to warn the user to change their timezone if the GPS coordinate fall within the specific timezone.

What methods can be used?

I’m currently using Rails 3.1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:53:02+00:00Added an answer on May 24, 2026 at 11:53 am

    You can divide the latitude by 15° and then round to the nearest integer to get the “natural” timezone offset in hours. But that will only help you on the high seas, because on land the timezone boundaries differ significantly from the mathematically ideal ones. In some places, such as western China, the official time can differ from the geographically standard one by as much as 3 hours (which is even before adjusting for daylight saving).

    So unless you embed a detailed map of timezone boundaries (which would be large and require some kind of updating mechanism as local and national governments decide to move around the timezones), the best you could hope to do would be to detect reliably is if your user flies intercontinentally but forgets to change his timezone. Unless you have a very specific audience, that is probably not worth the trouble.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my website, users can set preferences for their current timezone. I have a
In my web application we have many users.I want to set permission for each
I have a form field where users can change their passwords, but if they
In my web app, I let the users choose their preferred timezone from a
I have a site, e.g. example.com , where users can set their own subdomains
I have a 500,000 line SQL script: UPDATE users SET region_id = 9814746 WHERE
I have a dialog box that allows users to set hotkeys for use in
I have several workflows where the users want to set the number of days
I'm doing a sorting of a set of users, I have 4 groupings like
I have a set of select inputs representing a users birthday: birthyear, birthmonth and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.