Form for utc_datetime

Comparing datetimes should generally happen with UTC values only. The problem of dates is that a date doesn‘t have a timezone. If you want to match a date in asia to a utc datetime you‘d need to convert it first to the appropriate datetime interval in UTC matching the start/end datetimes for the given date in your timezone.

Hi, I’d like to ask how did you pulled the datetime value (in UTC) from the database and displayed it on the web page?

Sorry, I’m a newbie in learning elixir and phoenix.

Where to implement this?

require TzDatetime
TzDatetime.original_datetime(booking, datetime: :start_time)

This depends a bit on your architecture, but generally I’d suggest doing that close to where you pull items with those datetimes out of the db.