time-zone problem
Our company has a web application that is being used at some locations around world. the end-users are sales persons of small shops. each location might be in a different time-zone. our servers are located in San Diego, so each insert into the DB is inserted as San Diego time and not the location time, so when the user want to view the sale he made he will see our time and not his. the solution we implemented is to keep the data saved in San Diego time, but when the user want to search or view his sales we convert the time to it's local time, with the help of a look-up table. this table consist of 2 fields - location_id and location_gmt (Greenwich Mean Time). the problem we have now is the need to update the look-up table if any location's gmt is changed (and it changes at different times) the advantage of our solution is the ease of saving data. the disadvantage is the complexity when viewing or searching for saved data, and the need to know the GMT of a specific location in a specific time at the past. 1. do u think we should save the data in each location's time and not San Diego time? 2. do u know of any api (maybe a web service) to get GMT of specific location in a given time at the past? (we want to do it automatically, of course) thanks