diff options
author | href <href@random.sh> | 2021-09-07 08:14:46 +0200 |
---|---|---|
committer | href <href@random.sh> | 2021-09-07 08:14:46 +0200 |
commit | 4b87c93fd13cda5f80720058e979b722028f940c (patch) | |
tree | b7046da7006482a02352fcc317dfa439127b5dde /lib/lsg_irc/buffer_plugin.ex | |
parent | live fixes/improvements (diff) |
various fixes
Diffstat (limited to 'lib/lsg_irc/buffer_plugin.ex')
-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") |