Unverified Commit 46bfa2c4 authored by Thomas Citharel's avatar Thomas Citharel
Browse files

Add a default timezone if user's timezone is set to null

Closes #746

Signed-off-by: default avatarThomas Citharel <tcit@tcit.fr>
parent db6f88c0
......@@ -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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment