Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-343

set cell value with a Date resolved by EL produces an incorrect date

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.4.0
    • 5.3.0
    • None
    • None

      Steps to Reproduce

      1. load a blank sheet with a variable resolver
      <?variable-resolver class="io.keikai.devref.advanced.MyBeanResolver"?>
      2. enter =myBean.date at A1
      3. format A1 as a date, MM/dd/yyyy, check the date sting

      Current Result

      a date around 1950 e.g. 9/2/1950

      Expected Result

      the date your test

      Debug Information

      • When evaluating EL in ELEval, it converts a date to a double in a different way from CellImpl.setlValue:
        return new NumberEval(javaMillSecondToExcelDate(((Date)obj).getTime()));

      Workaround

      use Range.setCellValue(myBean.getDate())

        1. AssetsBean.java
          2 kB
          hawk
        2. MyBeanResolver.java
          0.4 kB
          hawk

            hawk hawk
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: