Question

This may well be a silly question but I was wondering if its possible to get the current in time of a user who requests a page from a web.py application in the web.py application. I understand the difference between client side and server side scripting and that web.py is a server side framework but I know that some data is sent to the server when a page is requested and I was wondering if the user's time was such a piece of information.

For this specific case having access to the user's time is not a requirement but a nicety to add extra features if/when nits available.

Is this information retrievable? and if so how might i go about accessing it?

Was it helpful?

Solution

There is no way to do this with http headers.

Using IP: Check out this link using the IP to get local time. Look at this answer for some other python geolocation libraries.

Ask: Why not ask the user what their timezone is?

Client side JavaScript: Determine a User's Timezone

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top