Add RDF.DateTime.tz/1 optimization for naive datetimes

This commit is contained in:
Marcel Otto 2018-09-11 00:04:39 +02:00
parent b0bfd7fe62
commit 1fa369197e

View file

@ -58,6 +58,8 @@ defmodule RDF.DateTime do
NaiveDateTime.to_iso8601(value)
end
def tz(%Literal{value: %NaiveDateTime{}}), do: ""
def tz(datetime_literal) do
if valid?(datetime_literal) do
lexical = lexical(datetime_literal)