diff options
Diffstat (limited to '')
-rw-r--r-- | lib/lsg_irc/buffer_plugin.ex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/lsg_irc/buffer_plugin.ex b/lib/lsg_irc/buffer_plugin.ex index 8d3cacd..d278151 100644 --- a/lib/lsg_irc/buffer_plugin.ex +++ b/lib/lsg_irc/buffer_plugin.ex @@ -31,6 +31,8 @@ defmodule LSG.IRC.BufferPlugin do {:noreply, ets} end + defp ts(nil), do: ts(NaiveDateTime.utc_now()) + defp ts(naive = %NaiveDateTime{}) do ts = naive |> DateTime.from_naive!("Etc/UTC") |