Detect user timezone and display UTC time with tha

2019-07-28 16:33发布

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

标签: php timezone
1条回答
等我变得足够好
2楼-- · 2019-07-28 17:02

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/

查看更多
登录 后发表回答