I want to give users the option to change their timezone and display their data in that timezone. I’m currently storing a unix timestamp and would like to know what the best way to handle this conversion would be.
I am storing my timestamp in unix format. My concern is what function can I use to do the conversion on the presentation layer?
Keep everything as UTC in your data store and convert at your presentation layer.
Store date data as GMT, and in the user prefs let them store their timezone (which is simply an offset of GMT).