I have a dropdown box on a webpage that takes a timezone identifier as the value (however I can change it to save the GMT offset if that is a better choice). Currently a user would be saving something like "America/Denver" as his / her time zone.
I need to convert a unix timestamp into the user's local time for display in another portion of the page. What is the best way to accomplish this?
Would it be better to store the GMT offset in the database and use that for a time calculation? Can someone please point me in the right direction here?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…