On 7/6/07, Hiep Nguyen <[EMAIL PROTECTED]> wrote:
we have warehouses all over U.S. and i just wonder what is the best way to find out their timezone base on zipcode. Should i buy a database or is there any function in mysql or php to get timezone base on a zipcode?
I looked at the zipcode databases ... not as expensive as I would have thought. It might be worth it just to spend the $100 or so. However, ... My understanding is that U.S. zipcodes have their first two digits based on state, i.e. "48" is Michigan. Since most of the time zone boundaries seem to fall on state boundaries, a simple mapping from the first two digits to the time zone might get you most of the way there. http://images.google.com/imgres?imgurl=http://worldatlas.com/webimage/countrys/namerica/usstates/timezone.gif&imgrefurl=http://worldatlas.com/webimage/countrys/namerica/usstates/timezone.htm&h=307&w=427&sz=23&tbnid=pXERv6TKqAu7DM:&tbnh=91&tbnw=126&prev=/images%3Fq%3Du.s.%2Btime%2Bzone%2Bmap%26um%3D1&start=2&sa=X&oi=images&ct=image&cd=2 However, for those states that are split, I don't know an easy way ... but there shouldn't be very many of those. Dave.