Hi, I have a application using phoenix with Ecto to make queries on a postgres db.
My db has fields with datetime in UTC format. I want to make queries on this db with Ecto considering the local timezone.
from(u in User) |> where([u], u.created_at <= ^input_datetime) |> Repo.all
The above query take the created_at in utc format to make the comparison. I don’t want this. I want Ecto convert created_at to local timezone before the comparison to obtain the correct result.