Fix: date handling
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-12-15 18:06:15 +01:00
parent 57285bf75b
commit bb9d2a5953

View File

@@ -7,7 +7,7 @@ defmodule Confient.Deposit do
def verify_date(due) do def verify_date(due) do
date = DateTime.now!(Application.fetch_env!(:confient, :timezone)) |> DateTime.to_date() date = DateTime.now!(Application.fetch_env!(:confient, :timezone)) |> DateTime.to_date()
if Timex.before?(date, due), do: :ok, else: {:error, :date_too_late} if Timex.equal?(Timex.to_date(date), due), do: :ok, else: {:error, :date_too_late}
end end
def verify_file(file) do def verify_file(file) do