Open dariober opened 5 years ago
@dariober Thanks for the details. I'm honestly not super familiar with the Iso8601Date
class or specification. ( I've been hoping we could replace this whole set of classes with more modern ones, but it's never been a high priority. https://github.com/samtools/htsjdk/issues/561.)
Is a space allowed in the spec? From a quick glance at wikipedia it looks like T
is the valid separator.
If you're running into this as a practical problem in the wild I think we could accept a PR that allows this to accept slightly non-conforming dates and times.
I wanted to point out that the parsing of date-time strings by
samtools.util.Iso8601Date
may be overly stringent sinceIso8601Date
doesn't allow a space as a separator between date and time. I think the space separator is quite common so it may be useful to support it?Steps to reproduce
To support the space separator one could edit the
DateParser
class insamtools/util/DateParser.java
from:to:
(I can send a pull request with tests if useful)
Environment