I will convert all date & time input by user (local time) to UTC and store it in database. When display back I will convert UTC time to their time zone which is set in their profile. Is it good?
I think it's good enough. Besides storing user timezone in profile, you can also let client (for example, javascript) convert UTC time according to user computer time zone.
As long as you can convert to/from any time zone from your stored DB records, that's all you need.
What you've described will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With