class RDF::Literal::DateTime
def to_s
def to_s @string ||= begin # Show nanoseconds but remove trailing zeros nano = @object.strftime('%N').sub(/0+\Z/, EMPTY) nano = DOT + nano if nano.present? @object.strftime(ALTERNATIVE_FORMAT) + nano + @object.strftime(TIMEZONE_FORMAT) end end