views:

95

answers:

5

Anyone know of a web service or something out there that I could give a zip code and get a time zone back?

Or is that something I just need to write myself? If so, any hints or guides on how to do that?

I use visual studio 2008 and C#.

A: 

Start here: http://www.zipinfo.com/search/zipcode.htm

n8wrl
+1  A: 

Write it yourself.

You can identify the state (almost always) by the first two numbers of the zipcode. The very few gaps shouldn't cross over time zone boundaries.

This means you only have 100 entries to store.

http://en.wikipedia.org/wiki/ZIP_code#By_geography

glowcoder
Except in Indiana, where some counties observe Eastern time and some observe Central time. (It used to be more quirky, but at least everyone's observing Daylight Saving time now).
JasonTrue
i must have missed the bit about US only (tho 'zip' does suggest that i suppose!!) :)
jim
I should have thought of that, Jason. I used to live in a section of Michigan in Central time whilst the rest of the state is in Eastern. However, the number of exceptions is few, and should be relatively easily to toss into a lookup table.
glowcoder
A: 

there may be something at http://ws.geonames.org. i use it for picking up town names from their webservices. http://www.geonames.org/export/ws-overview.html gives an overview on what's available - see http://www.geonames.org/export/web-services.html#countryInfo

jim
+1  A: 

I had the same issue. We bought a subscription to ZipcodeDownload and the schema provides (among other items) timezone. Just loaded into SQL and we were off to the races.

Andy Evans
A: 

If you do not want to write the codes and maintain the database yourself then try to find web services like http://www.fraudlabs.com/demozipcodeworldUS.aspx

It returns some other information as well.

JaceyKala