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! Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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 =) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.