If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Redirecting given time and location of visitor and sunset

On my website, if someone visits the website between Sunset Friday and Sunset Saturday in their time, how can I redirect them to a page that says "Thank you for visiting our website. However, it is the Sabbath and we are closed. Please visit at a later time."

So if it is the Sabbath in New York City, for example, it may not be the Sabbath and say, Tokyo. Therefore, the website would redirect a visitor in New York City between Sunset Friday and Sunset Saturday, but it would be "open" in Tokyo.

What coding requirements would be necessary in order to make this dynamic happen? Thank you very much for your assistance.

There is a way to get a person's location, but it requires using javascripting, which isn't always reliable. They can have javascripting turned off, or change the date/time on their computer. Easy to bypass, easy to lie about the time ... so they could easily access your site.

The best way is to ask the person to pick the major city in their timezone. That is an extra step that they may not wish to take. Google has the "location" app, but it pops up a box asking the user if they wish to let Google find their location, so they may just say "no" to that.

So the answer is, you can get their location, but they can pretty much give you any location they want ... and then they can access your site. No way to make it 100% effective.

The origination of the Sabbath wasn't meant for something like the world-wide-web?

And ... what if I live in Northern Alaska and there is no sunset during the summer months, nor sunrise during the winter.

The time for sunset is going to vary a lot depending on exactly where the person lives and you have no way of finding out where they live unless they tell you and no easy way of determining when sunset is there.

You would be more successful if you decided to base it on sunset where you are.