Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8066806

java.time.format.DateTimeFormatter cannot parse an offset with single digit hour

    Details

    • Subcomponent:
    • Introduced In Version:
      8
    • Resolved In Build:
      b130
    • CPU:
      generic
    • OS:
      generic

      Description

      There's no way to parse a single digit hour in the offset. Example:

        2011-01-20 02:55:07.532941 -8:00

      The spec needs to be modified to cover this case and the code enhanced to support it.

      The only workaround is to parse the date/time separately, use a hand coded parser for the offset and combine the LocalDateTime with the hand parsed offset. Not an easy work around.

      I have run across some occurrences of this though I can't say how common it is.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            ntv Nadeesh Tv (Inactive)
            Reporter:
            dsurber Douglas Surber
          • Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: