Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TeDomum
Mobilizon
Commits
46bfa2c4
Unverified
Commit
46bfa2c4
authored
Aug 20, 2021
by
Thomas Citharel
Browse files
Add a default timezone if user's timezone is set to null
Closes #746 Signed-off-by:
Thomas Citharel
<
tcit@tcit.fr
>
parent
db6f88c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/service/date_time/date_time.ex
View file @
46bfa2c4
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment