Skip to content

Commit 1544ef0

Browse files
committed
fix date
1 parent c418386 commit 1544ef0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/rails_semantic_logger/action_mailer/log_subscriber.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ def payload
5959
end
6060

6161
def date
62-
if date = event.payload[:date]
62+
if event.payload[:date].respond_to?(:strftime)
63+
event.payload[:date]
64+
elsif event.payload[:date].is_a?(String)
6365
Time.parse(date).utc
6466
else
6567
nil

0 commit comments

Comments
 (0)