Determining time zone a web site visitors time zone

Recently I faced a challenge to write a server side script in .NET to determine a users’ time zone. This was coming from a client in UK who was having a high traffic web site and he wanted an efficient way to determine the time zone of a user. The main condition was that it could not use any client side scripting and that it had to be very efficient.

After searching the web I realized that there were no free services that provided this kind of service. There were a few that did this for a fee.

But there were a few services that provided the visitors country based on the IP of the visitor. So I went ahead and proposed a solution where the country was discovered through one of these free services or a database and then to construct a database that contained time zones and countries.

So I used the free web service at http://www.hostip.info to determine the country and then used my database to discover the time zone. this solution worked perfectly.

But the client refused to accept it because it consumed a web service. He insisted that consuming the web service will eat up his band width and that it was not feasible for him. Then I was searching around and came across the GeoIP lookup database that is being used in the DotNetNuke portal. Since this was a free database, I then changed my implementation to use this.

And I used caching to improve the performance and this was accepted by my client. Thanks Official Project Base!

Advertisements

  1. It’s going to be end of mine day, but before finish I am
    reading this fantastic article to improve my know-how.

  2. Have you ever thought about publishing an ebook or guest authoring on other blogs?
    I have a blog based on the same topics you discuss and
    would really like to have you share some stories/information. I
    know my audience would enjoy your work. If you are even remotely interested, feel free to shoot me an e-mail.

  3. I’m amazed, I must say. Rarely do I come across a blog that’s both educative and entertaining, and without a doubt, you’ve hit the
    nail on the head. The problem is something which too few men and
    women are speaking intelligently about. Now i’m very happy that I came across this
    in my hunt for something concerning this.




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s



%d bloggers like this: