www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16053] New: SysTime.fromIsoExtString don't work if


          Issue ID: 16053
           Summary: SysTime.fromIsoExtString don't work if nanoseconds are
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: chalucha gmail.com

Just came across the REST API which returns time in format like this:

Which results in Invalid ISO Extended String exception.

Accoording to wikipedia, there is no limit for decimal fraction:
"There is no limit on the number of decimal places for the decimal fraction.
However, the number of decimal places needs to be agreed to by the
communicating parties."

There is this check in a fracSecsFromISOString method:
enforce(!str.empty && str.length <= 7, new DateTimeException("Invalid ISO

It would be nice if this method can handle this kind of input strings even
though that nanoseconds would be thrown away (probably should be documented

Is this legit?

May 21 2016