Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5381

Numbers inserted into a date field will converted into a wrong date

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      Steps to Reproduce

      The "short" insert method for date values (without delimiters, e.g. 04112022) will convert the value into a wrong date. The behaviour depends on the JAVA version used in Apache Tomcat (e.g. Eclipse Adoptium and Oracle). It is working as expected for  Oracle 1.8.0_291, OpenJDK Temurin 1.8.0_345. But, not working as expected for Adoptium 11.0.7.10, 11.0.13.8, 11.0.17.8.

       

      Insert "04112022" in the DATE field and press TAB to leave it.

       

      You have only to change the "JAVA Virtual Machine" in the Apache configuration and restart the Apache to reproduce it.

      Current Result

      With the JAVA version from Adoptium, the numbers will convert WRONG to "04.11.02".
      (tested with version 11.0.7.10, 11.0.13.8, 11.0.17.8)

       

      With the JAVA version from Oracle or Temurin, the numbers will convert CORRECT to "04.11.22".
      (tested with version Oracle 1.8.0_291, OpenJDK Temurin 1.8.0_345)

      Expected Result

      The above date should be converted to something like 04.11.22 or 04.11.2022

      Debug Information

       

      Workaround

      Set Java option in Tomcat -
      -Djava.locale.providers=COMPAT
       
      What is the solution apart from this compatibility switch. 
       

            Unassigned Unassigned
            HYLSayantan HYLSayantan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: