且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

根据不同国家的用户计算机时间在网站上显示日期/时间

更新时间:2023-11-09 09:46:04

只要用户正确设置了时间,您的解决方案就应该有效.这实际上是唯一的问题.为什么你认为没有人这样做?我猜他们中的大多数人都这样做,只有懒惰的人依赖 GMT/EST 时间.

Your solution should work as long as the user has the time set correctly. That is the only problem actually. Why do you think no one is doing it ? I guess most of them do and only the lazy ones relies on GMT/EST times.

提示:我看到了在跟踪代码中发送的用户时间,例如 google 的分析 javascript,可能是为了计算您正在计算的差异;)

Hint: I saw the user time sent in tracking codes such as google's analytics javascript, probably for computing the difference you are taking about ;)