voip03 Posted August 14, 2011 Share Posted August 14, 2011 Get the user's current local time with PHP User’s actual local time this differs across time zones. Is there a reliable way of getting a user's current time and/or time zone? thank you Quote Link to comment https://forums.phpfreaks.com/topic/244780-get-the-users-current-local-time-with-php/ Share on other sites More sharing options...
jcbones Posted August 14, 2011 Share Posted August 14, 2011 2 ways: 1. Ask the user his/her timezone 2. Use javascript to grab it, and then send it to the server. Quote Link to comment https://forums.phpfreaks.com/topic/244780-get-the-users-current-local-time-with-php/#findComment-1257293 Share on other sites More sharing options...
voip03 Posted August 14, 2011 Author Share Posted August 14, 2011 can't use PHP Quote Link to comment https://forums.phpfreaks.com/topic/244780-get-the-users-current-local-time-with-php/#findComment-1257294 Share on other sites More sharing options...
xyph Posted August 14, 2011 Share Posted August 14, 2011 No, PHP is server side, and only knows the information the client sends to the server. Timezone isn't sent automatically. Quote Link to comment https://forums.phpfreaks.com/topic/244780-get-the-users-current-local-time-with-php/#findComment-1257299 Share on other sites More sharing options...
voip03 Posted August 14, 2011 Author Share Posted August 14, 2011 Thank u Quote Link to comment https://forums.phpfreaks.com/topic/244780-get-the-users-current-local-time-with-php/#findComment-1257316 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.