I understand the best practice is to store UTC date/times in our database and display to the user in their local timezone. We'll store the timezone rather than the offset so we can support daylight savings time.
What way is best for handling timezones?
Option 1: Server speaks UTC only and client converts to timezone
All dates sent to the browser in HTML are in UTC. The client side will convert the UTC time to the correct timezone using moment.js or similar. The timezone specified in our database would be used rather than the browsers local time since that may be incorrect.
When the user submits a date or time, it must first be converted to a UTC time before being submitted to the server.
Option 2: Server converts to timezone
All calculations are still made in UTC and date/times are converted to the correct timezone at the last possible moment, for example when outputting the date in HTML.
When the client submits any date/times, it should be immediately converted to UTC.