Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1425

DateUtils.parseDateStrictly() is not parsing millisecond value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.7
    • None
    • None
    • None

    Description

      We need to parse String to java.util.Date and are having multiple Date formats.

      Snippet for this is

      java.util.Date dt = DateUtils.parseDateStrictly(verificationDate.get_value(),
                                          Locale.ENGLISH,
                                          new String[] { "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSXXX","yyyy-MM-dd'T'HH:mm::ss.SSSSSSS" });

      2018-11-13T08:03:41.2860000-06:00 is not being parsed correctly. On troubleshooting, we discovered that 2018-11-13T08:03:41.0000286-06:00 is parsing fine.

      How to handle this?

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            VamsiBhagi Vamsi Krishna Bhagi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: