If you are building social network or chat app then this post is really helpful. Logic behind this thing is very simple when ever user post data we set time GMT to GMT 0 as shown below now when ever other user view post we first get his time zone and calculate time according to that zone and show. Please check comment where we do all this.
hope this help you 🙂