[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-general
Subject:    [PHP] User Timezone
From:       Karl DeSaulniers <karl () designdrumm ! com>
Date:       2012-10-20 7:39:31
Message-ID: DAA361CF-BCB0-4B43-A358-476967BD5EFA () designdrumm ! com
[Download RAW message or body]


Hello all,
Happy weekend. Hoping you can help me with an age old question.
I am trying to get a users timezone for a purchase online.
I know that php is not really able to get a timzone of a user because  
its a server side execution with the date functions.
But I wanted to get a little help on my work around. I am hoping  
someone can help. TIA

I have a form that a user must fill out in order to purchase anything.
On this form they are required to put their city, state, country and  
zip code.
These are all required fields.

Now, I know there is a way to get a timezone offset if you have a  
location to offset.
So is there a way based on the fields provided that I can get that  
offset for each user?

(The users have to put a correct city, state, country and zip in order  
to get there purchase.
This address has to match their paypal or cc address in order to  
purchase as well.
So I know there will still be a margin of error with user manipulated  
info. So that is moot point for now.)

My thoughts are to get a timezone offset based on the country and zip  
code, with a backup check of city state country zip.
I just don't know where to start looking for how to get the timezone  
or UTC location based on country and zip or city state country zip.

Any help is appreciated.

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic