On Mon, January 29, 2007 10:55 pm, Jay Blanchard wrote: > [snip] > I am writing a program for managing leads and contacts. I would like > to > add > the ability to see what TIME it is where the contact is not there > server > time. So if you looked at a list of contacts from all over the country > you > would see different times compared to what time it is where the user > is > at. > What should I be looking at to calculate out the different time zones. > Could > somebody just point me in the write direction at this time I have no > idea on > how to proceeded. > [/snip] > > You would use JavaScript to capture their local 'browser' time and > process it with PHP
Since their computer clock is probably wrong (way wrong) this may be very problematic... Assuming contacts know what time zone they (usually) live in, you can ask them to set that in their profile. You can even pre-populate it with your best guess from their IP and one of the zillion IP to country databases floating around. Ultimately, however, you're going to have problems because there's no way you can know for sure for sure where the user is, even if they are "usually" in time zone X. It's amazing just how complicated time can be, when you start actually trying to do anything useful with it. Puns intended. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php