Receiving user time

Asked

Viewed 49 times

5

I’m a beginner in php and I’m racking my brain to find a solution. I have the following problem:

I have a web application where my user builds his online physical establishment (hotsite). And in it is recorded all the Inns ... In it also my client arrow the days and times of operation. When accessing my client’s website, there is a label saying whether or not the store is open. However, when there is access from other regions of Brazil. I have no control to show whether it is open or closed due to the time zone.

I would like you, when the third party enters the customer’s website, to return your local time and thus perform a time conversion.

I have no idea how to do this check. I’ve scoured the internet for solutions be in javascript, PHP and the like. I found nothing.

If anyone can help me, I’d appreciate it.

1 answer

1

I may not even have understood the problem but if I understand I will try to answer the best that gives.

You probably didn’t find any information because you can’t do it reliably. So instead of telling you how to do it, the best I can answer you is, don’t!

You will have to pick up information that you have no control over. In addition, it is not only the time that will determine whether the store is open or closed. If you put that it is open and for some reason it is not you will be deceiving the person. Even if it is her fault.

In addition to which it is worth saying that it is open will close in 30 seconds or 30 minutes and she will need to cross the city?

So put the hours of operation. This information is much more useful to those who are accessing the website than to say if the store is open. The user experience it will be better.

There’s a whole science that studies this kind of thing and as much as it might seem to be doing something different at the bottom nobody really wants it because this feature brings more losses than profits.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.