Indiana has two time zones as I recall. The state is divided roughly in half between the two.
Dirk Bremer - Senior Systems Engineer - Utility - AMS - NISC Lake St. Louis MO - USA Central Time Zone 636-755-2652 fax 636-755-2502 [EMAIL PROTECTED] www.nisc.coop -----Original Message----- From: Hiep Nguyen [mailto:[EMAIL PROTECTED] Sent: Friday, July 06, 2007 10:51 To: David T. Ashley Cc: mysql@lists.mysql.com Subject: Re: zipcode to timezone On Fri, 6 Jul 2007, David T. Ashley wrote: > 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/co untrys/namerica/usstates/timezone.gif&imgrefurl=http://worldatlas.com/we bimage/countrys/namerica/usstates/timezone.htm&h=307&w=427&sz=23&tbnid=p XERv6TKqAu7DM:&tbnh=91&tbnw=126&prev=/images%3Fq%3Du.s.%2Btime%2Bzone%2B map%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. > i don't think there is any state got 2 timezones, i could be wrong. but if that the case, state -> timezone is working for me. now, how do i look up for timezone if i got state? i don't mind buying the database, but i just don't want to replace the database if something change down the road. thanks T. Hiep -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]