Home » Category » MySQL

MySQL: zipcode to timezone

116| Tue, 06 May 2008 20:11:00 GMT| hiepnguyen| Comments (9)
Hi there,

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?

Thanks

Keywords & Tags: zipcode, timezone, mysql

URL: http://database.itags.org/mysql/62272/
 
«« Prev - Next »» 9 helpful answers below.
Fri, 6 Jul 2007, David T. Ashley wrote:

7/6/07, Hiep Nguyen <hiep (AT) ee (DOT) ucr.eduwrote:
>
>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.

%3Fq%3Du.s.%2Btime%2Bzone%2Bmap%26um%

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

hiepnguyen | Tue, 06 May 2008 20:13:00 GMT |

Hiep Nguyen wrote:
Hi there,

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?

You may be able to call a web service from your PHP code to find this out.

baronschwartz | Tue, 06 May 2008 20:14:00 GMT |

7/6/07, Hiep Nguyen <hiep (AT) ee (DOT) ucr.eduwrote:

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.

%3Fq%3Du.s.%2Btime%2Bzone%2Bmap%26um%

However, for those states that are split, I don't know an easy way but
there shouldn't be very many of those.

Dave.

davidt_ashley | Tue, 06 May 2008 20:15:00 GMT |

Message
From: Hiep Nguyen [mailto:hiep (AT) ee (DOT) ucr.edu]
Sent: Friday, July 06, 2007 10:51 AM
To: David T. Ashley
Cc: mysql (AT) lists (DOT) mysql.com
Subject: Re: zipcode to timezone

i don't think there is any state got 2 timezones, i could be wrong.

Yeah, you are.

INFRMATIN IN THIS MESSAGE, INCLUDING ANY ATTACHMENTS, IS INTENDED FR THE PERSNAL AND CNFIDENTIAL USE F THE INTENDED RECIPIENT(S) NAMED ABVE. If you are not an intended recipient of this message, or an agent responsible for delivering it to an intended recipient, you are hereby notified that you have received this message in error, and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you received this message in error, please notify the sender immediately, delete the message, and return any hard copy print-outs.

johntrammell | Tue, 06 May 2008 20:16:00 GMT |

7/6/07, John Trammell <johnt (AT) holmescorp (DOT) comwrote:

Message
From: Hiep Nguyen [mailto:hiep (AT) ee (DOT) ucr.edu]
Sent: Friday, July 06, 2007 10:51 AM
To: David T. Ashley
Cc: mysql (AT) lists (DOT) mysql.com
Subject: Re: zipcode to timezone

i don't think there is any state got 2 timezones, i could be wrong.

Yeah, you are.

other thought comes to mind. Is there a guarantee that a timezone can't
split a zipcode?

In other words, is the mapping from zipcode->timezone guaranteed to exist in
all cases?

I remember a friend in Tennessee who would take her children to school (10
miles away) and the school was in a different timezone than her home, so it
got very confusing what time the kids had to be up and to bed and all that.

In rural areas where the zipcodes can be rather large, I'm just wondering if
there is any guarantee that a zipcode can't span two timzones.

davidt_ashley | Tue, 06 May 2008 20:17:00 GMT |

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 M - USA Central Time Zone
636-755-2652 fax 636-755-2502 dirk.bremer (AT) nisc (DOT) coop www.nisc.coop

Message
From: Hiep Nguyen [mailto:hiep (AT) ee (DOT) ucr.edu]
Sent: Friday, July 06, 2007 10:51
To: David T. Ashley
Cc: mysql (AT) lists (DOT) mysql.com
Subject: Re: zipcode to timezone

Fri, 6 Jul 2007, David T. Ashley wrote:

7/6/07, Hiep Nguyen <hiep (AT) ee (DOT) ucr.eduwrote:
>
>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.
--

%3Fq%3Du.s.%2Btime%2Bzone%2B
map%26um%

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

dirkbremer | Tue, 06 May 2008 20:18:00 GMT |

I think Indiana has two time zones. I think there are also some states or
portions thereof that don't observe daylight saving time.

Regards,

Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com

Message
From: Hiep Nguyen [mailto:hiep (AT) ee (DOT) ucr.edu]
Sent: Friday, July 06, 2007 11:51 AM
To: David T. Ashley
Cc: mysql (AT) lists (DOT) mysql.com
Subject: Re: zipcode to timezone

Fri, 6 Jul 2007, David T. Ashley wrote:

7/6/07, Hiep Nguyen <hiep (AT) ee (DOT) ucr.eduwrote:
>>

>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.
--

1&tbnw=126&prev=/images%3Fq%3Du.s.%2Btime%2Bzone%2Bmap%26um%3D

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

jerryschwartz | Tue, 06 May 2008 20:19:00 GMT |

Fri, 6 Jul 2007, Dirk Bremer wrote:

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 M - USA Central Time Zone
636-755-2652 fax 636-755-2502 dirk.bremer (AT) nisc (DOT) coop www.nisc.coop

Message
From: Hiep Nguyen [mailto:hiep (AT) ee (DOT) ucr.edu]
Sent: Friday, July 06, 2007 10:51
To: David T. Ashley
Cc: mysql (AT) lists (DOT) mysql.com
Subject: Re: zipcode to timezone

Fri, 6 Jul 2007, David T. Ashley wrote:
>
>7/6/07, Hiep Nguyen <hiep (AT) ee (DOT) ucr.eduwrote:


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.
>>
>>


%3Fq%3Du.s.%2Btime%2Bzone%2B
map%26um%
>>

>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

hiepnguyen | Tue, 06 May 2008 20:20:00 GMT |

Message
From: Hiep Nguyen [mailto:hiep (AT) ee (DOT) ucr.edu]
Sent: Friday, July 06, 2007 12:15 PM
To: Dirk Bremer
Cc: David T. Ashley; mysql (AT) lists (DOT) mysql.com
Subject: RE: zipcode to timezone

now, why do they do this? it doesn't make any sense at all to have
multiple timezones in a state, at least to me. men, they have too much
time in their hand and this is they came up, two timezones in a state.

Me neither. I was interested to learn that there are noticeable energy savings associated with the Daylight Savings time change. Who'd a thunk it?

JT

INFRMATIN IN THIS MESSAGE, INCLUDING ANY ATTACHMENTS, IS INTENDED FR THE PERSNAL AND CNFIDENTIAL USE F THE INTENDED RECIPIENT(S) NAMED ABVE. If you are not an intended recipient of this message, or an agent responsible for delivering it to an intended recipient, you are hereby notified that you have received this message in error, and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you received this message in error, please notify the sender immediately, delete the message, and return any hard copy print-outs.

johntrammell | Tue, 06 May 2008 20:21:00 GMT |

MySQL Hot Answers

MySQL New questions

MySQL Related Categories