aznjay Posted November 26, 2006 Share Posted November 26, 2006 okay I wanted the time from the computer but whenever I use $current = date("F j, Y, g:i a"); this gets the time of the server I want the time from the viewers computer...how can I do that? Link to comment https://forums.phpfreaks.com/topic/28495-date-and-time-question/ Share on other sites More sharing options...
corbin Posted November 26, 2006 Share Posted November 26, 2006 Ummm the only thing I would think you could do would be either ask them for their time zone, then assume their computers' clocks are correct, or use javascript and ajax or something like that...If you dont mind me asking, what do you need to know a user's time for? Link to comment https://forums.phpfreaks.com/topic/28495-date-and-time-question/#findComment-130385 Share on other sites More sharing options...
aznjay Posted November 26, 2006 Author Share Posted November 26, 2006 [quote author=corbin link=topic=116329.msg473903#msg473903 date=1164524041]Ummm the only thing I would think you could do would be either ask them for their time zone, then assume their computers' clocks are correct, or use javascript and ajax or something like that...If you dont mind me asking, what do you need to know a user's time for?[/quote]i need th user's time because it's their current time if i show my server's time, they'll be like wat the hell is wrong with this site!! Link to comment https://forums.phpfreaks.com/topic/28495-date-and-time-question/#findComment-130392 Share on other sites More sharing options...
JasonLewis Posted November 26, 2006 Share Posted November 26, 2006 just have a note somewhere saying that times on this sever are GMT +10 or whatever. Link to comment https://forums.phpfreaks.com/topic/28495-date-and-time-question/#findComment-130399 Share on other sites More sharing options...
corbin Posted November 26, 2006 Share Posted November 26, 2006 Are you ever using the time for a database or something? If not just use javascript to display their local time... If you are using it in a database just use the server time and either work it in with JS or ask them their timezone and store it in the db. Link to comment https://forums.phpfreaks.com/topic/28495-date-and-time-question/#findComment-130402 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.