I'm working on the back-end of an Android native mobile app. This app will be used to create items, send and accept requests from other user and so on.
I'm wondering how to manage the time zones with these requests. If a Japanese user sends a request to a Spanish user, both users will have to see in their app the correct date and time for their timezones and the date and time will be different...
How can I manage this issue in the back-end?
I guess I should save date and time with the server time-zone (just adding a column timestamp with default value set to NOW); then when data are requested, get the time-zone the request comes from, take the timestamp from the db and convert it to the target time zone.
But I'm not sure if this is the better way to solve the problem and how to do it.
Any help will be appreciated )