Re:Smart Time Ago: a new JS lib to update relative timestamp...
by NelsonMinar on Thursday July 26, 2012 @02:24PM
(#4297729)
Javascript relative time displays have hilarious results if the web browser's clock is set incorrectly. That's mostly not a modern problem thanks to NTP being baked into modern consumer OSes but it can be terribly confusing if you have a misconfigured client.
[ Parent
| on HN ]
Re:Smart Time Ago: a new JS lib to update relative timestamp...
by saurik on Thursday July 26, 2012 @02:55PM
(#4297908)
The simple solution to this is that the server sends a reference time along with the timestamps: when the page loads you calculate the drift from the local time to the reference time, and then adjust local time to server time when you update relative timestamps.