Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我遇到了在不同时区显示时间的问题。我将 TIMESTAMP 作为 UTC 存储在 mysql 数据库中。
显示5分钟前、昨天、两天前等时间真的能解决问题吗?如果它确实解决了我如何将该UTC时间戳转换为javascript日期?
You can use the Date object which has a UTC method:
http://www.w3schools.com/jsref/jsref_utc.asp