Add a default timezone if user's timezone is set to null
Closes #746 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
db6f88c0a0
commit
46bfa2c422
@ -62,7 +62,7 @@ defmodule Mobilizon.Service.DateTime do
|
||||
def calculate_next_day_notification(%Date{} = day, options \\ []) do
|
||||
compare_to = Keyword.get(options, :compare_to, DateTime.utc_now())
|
||||
notification_time = Keyword.get(options, :notification_time, ~T[18:00:00])
|
||||
timezone = Keyword.get(options, :timezone, "Etc/UTC")
|
||||
timezone = Keyword.get(options, :timezone, "Etc/UTC") || "Etc/UTC"
|
||||
|
||||
send_at = DateTime.new!(day, notification_time, timezone)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user