I would venture to guess that the front end does not need ANY understanding of time zones in general.
When they pick the time from the datepicker, just pass it back as it is (if they chose 9PM, just return 9PM). On the server, convert this date and time to a timestamp.
At this point, you can make adjustments for the IP-based custom time zone or, nevertheless, you decide to implement this. You can simply add or subtract the clock from your target time according to the user's time zone.
However, this means that you will also need to re-parse the time when you output them to make sure that they display as they should. For example, if you store a Unix timestamp, make sure that you print the formatted date based on the user's location.
You should definitely allow the user to choose their own timezone to override, but you do this by default.
rockerest
source share