Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

web: deployment may not have completed at

+8 -4
+8 -4
apps/sower/lib/sower_web/components/sower_components.ex
··· 183 183 """ 184 184 end 185 185 186 - attr :datetime, DateTime, required: true 186 + attr :datetime, DateTime, default: nil 187 187 attr :user_timezone, :string, required: true 188 188 189 189 def local_datetime(assigns) do 190 190 local_dt = 191 - assigns.datetime 192 - |> DateTime.shift_zone!(assigns.user_timezone) 193 - |> Calendar.strftime("%Y-%m-%d %H:%M:%S") 191 + if assigns.datetime do 192 + assigns.datetime 193 + |> DateTime.shift_zone!(assigns.user_timezone) 194 + |> Calendar.strftime("%Y-%m-%d %H:%M:%S") 195 + else 196 + "-" 197 + end 194 198 195 199 assigns = assign(assigns, :local_dt, local_dt) 196 200