For my project (web and iPhone-based applications) I need to collect the user's time zone to show him / her the relevant data. Some of the features I can think of are:
1. Having received it using the user's IP address (but what if the user is behind a proxy server)
2. By sending it with the request parameters (But this will require an additional parameter that will be attached with the request or can be collected once for the session)
3.Passing it through cookies (has the same meaning as setting in the parameters)
4. Based on the user zip code that I collect during registration, but for an unregistered user who can view the application, she will not be able to see the corresponding data.
Thus, in all the approaches that I can now think of, there are one or more disadvantages. I just want to know which other approaches exist, and which one is best used in a case where the user interface is not affected, and the user is clearly not asked a question about his / her time zone. Also, the approach should be applied both to the Internet and to the iPhone.
source share