How to Implement Dynamic Timestamp in Web Page?
- by Morgan Cheng
In Facebook and twitter, we can see that there is a timestamp like "23 seconds ago" or "1 hour ago" for each event & tweet. If we leave the page for some time, the timestamp changes accordingly.
Since it is possible that user machine doesn't have same system time as server machine, how to make the dynamic timestamp accurate?
My idea is:
It is…