Make sure we have a valid timezone
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b28402f7a7
commit
bab751591f
@ -291,6 +291,8 @@ defmodule Mobilizon.Service.Notifications.Scheduler do
|
||||
end
|
||||
|
||||
defp date_to_datetime(%Date{} = day, time, timezone) do
|
||||
# Just in case
|
||||
timezone = timezone || "Etc/UTC"
|
||||
{:ok, datetime} = NaiveDateTime.new(day, time)
|
||||
{:ok, datetime} = DateTime.from_naive(datetime, timezone)
|
||||
datetime
|
||||
|
Loading…
Reference in New Issue
Block a user