Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-515

Specifying an empty calendarPattern and empty document for date/time types should return epoch

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • s9
    • s7
    • None
    • None

      Currently, if you create this scenario, you get the following error:

      [info] - test_epochFillIn2 *** FAILED ***
      [info] java.lang.Exception: Parse Error: Convert to Time (for xs:time): Cannot parse calendar from empty string
      [info] Schema context: element.time23 Location line 2183 column 169 in file:/home/jchab/NGF/dfdl/daffodil-test/target/scala-2.9.2/test-classes/edu/illinois/ncsa/daffodil/section05/simple_types/SimpleTypes.tdml
      [info] Data location was preceding byte 0
      [info] UTF-8 text starting at byte 0 is: ()
      [info] Data (hex) starting at byte 0 is: (0x)

      However, if you create a calendar pattern of "." and your document is ".", the result is epoch time. This should be the result for the empty string as well.

      see tests:
      epochFillIn2
      dateEpochFillIn2
      in:
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section05/simple_types/TestSimpleTypes2.scala

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: