Reply to deleting cookies and local browser time versus server time

Your name:

Reply:


Posted by lawpoop on 01/02/08 17:05

Hello all -

Is there a way to get the local time from the user's browser? I didn't
see anything in the $_SERVER array.

For unsetting cookies, the PHP documentation page for cookies
recommends setting the expiration date to a point in the past.
However, I'm running into problems with time conflicts. Our server is
in a different time zone than the browser I'm developing on. I would
like to go in five-minute increments to test my code after the cookie
expires, and it took me forever to figure out why my cookies weren't
expiring in five minutes.

It's not a big deal because it's only a few hours, so I can set the
time back several hours when we actually go into production. Of
course, hard coding any time could fail, is the user is halfway around
the world. So ideally I could look at the browser's local time, and
set the cookie back appropriately.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация