0

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?

jonathan topf
  • 7,897
  • 17
  • 55
  • 85

1 Answers1

0

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

Community
  • 1
  • 1
Justin Poehnelt
  • 2,992
  • 1
  • 19
  • 23
  • Its for a very simple site that only has one page so prompting for a timezone is something I'd prefer not to do just to keep things simple. On balance I think javascript is the most elegant solution even though I'd rather stay away from any client side stuff – jonathan topf Jan 29 '14 at 14:11