Jump to content

Client Browser Time


PHP_Newbie1

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.