Kiran Joshi wrote:There could be multiple timezones in a single country..
so that approach has limitations.
Agreed! Also there could be clients who are using VPNs, public, coporate or private proxy servers. So, IP based mechanism will not identify timezones correctly. Application will store proxy server's timezone instead of client's.
Multiple timezones in a single country will be an issue, specially if the client's ISP is using NAT servers. In such case the IP of the NAT server will be checked, leading you to store the timezone of NAT server.
Or you could just ask the user to tell you their preferred timezone, and store this in the user's profile for the web site. You could use the other methods to guess what the user's timezone is so you can provide a reasonable default/initial value.