PHP_Newbie1 Posted September 24, 2009 Share Posted September 24, 2009 Hi exalted PHP Masters, I have a simple request for help retrieving a browser's local time using PHP. One Thousand Thanks! Link to comment https://forums.phpfreaks.com/topic/175293-client-browser-time/ Share on other sites More sharing options...
5kyy8lu3 Posted September 24, 2009 Share Posted September 24, 2009 javascript. php being serverside can't really help much with time differences. an easy option is to have the user enter and save an offset (-3, 0, +5, etc) and add that to time. so, they log in, it saves their saved offset to a session variable, then you just add that offset onto the time/date anywhere you use date or time. or you could use javascript. Link to comment https://forums.phpfreaks.com/topic/175293-client-browser-time/#findComment-923858 Share on other sites More sharing options...
PHP_Newbie1 Posted September 24, 2009 Author Share Posted September 24, 2009 You're right. I'll try Javascript. I mean, what percentage of people disable javascript anyway? Link to comment https://forums.phpfreaks.com/topic/175293-client-browser-time/#findComment-923863 Share on other sites More sharing options...
5kyy8lu3 Posted September 24, 2009 Share Posted September 24, 2009 You're right. I'll try Javascript. I mean, what percentage of people disable javascript anyway? not many =) if anything, just require that they have javascript enabled to use your site. with jquery and ajax ever-so-popular, i don't think it's "wrong" anymore to require JS. just my opinion of course =) Link to comment https://forums.phpfreaks.com/topic/175293-client-browser-time/#findComment-923866 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.