I have a table with UTC TIMESTAMPS column. How I display it with user timezone? Facebook uses user computer’s time settings. Facebook has no page for user setting their timezone, so I guest Facebook auto detect it. How I can achieve like Facebook? I'm using php
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You can't reliably do this on the server side. You can instead detect the user's timezone using JavaScript but it may not be totally reliable.
http://www.onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/