Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-16371

When running JIRA on IBM JVM using a german locale, the short dates for the months are different to running on Sun JVM

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Won't Fix
    • None
    • None
    • IBM J9 VM
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      When running JIRA on IBM J9 VM using a german locale, the short dates for the months are different.

      In particular the short date for march on Sun JVM is Mrz and this is the same as the Javascript date picker. However on IBM J9 VM the short format is Mär. This leads to a situation where the Javascript date picker will put in the wrong value (Mrz) when running on an IBM JVM (which expects Mär).

      The following java program illustrates the differences.

      import java.util.*;
      import java.text.*;
      
      public class Test {
      
      	public static void main(String[] args) {
      
      		SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy", Locale.GERMAN);
      		//works on sun
      		try {	
      			df.parse("09-Mrz-2008");
      			System.out.println("Parsed 09-Mrz-2008 successfully");
      		}catch(Exception e) {
      
      			e.printStackTrace();
      		}
      
      		//works on IBM
      		try {   
      			df.parse("09-Mär-2008");
      			System.out.println("Parsed 09-Mär-2008 successfully");
      		}catch(Exception e) {
      		
      			e.printStackTrace();
      		}
      
      	}
      }
      

      Output on Sun/ Apple JVM

      [amyers@erdinger:~]$ java -version
      java version "1.5.0_16"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
      Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
      [amyers@erdinger:atlassian-jira-enterprise-3.13.1-standalone]$ java Test
      Parsed 09-Mrz-2008 successfully
      java.text.ParseException: Unparseable date: "09-Mär-2008"
      	at java.text.DateFormat.parse(DateFormat.java:335)
      	at Test.main(Test.java:20)
      

      Output on IBM JVM

      [was@centos5was bin]$ ./java -version
      java version "1.5.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build pxi32dev-20060511 (SR2))
      IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20060504 (JIT enabled)
      J9VM - 20060501_06428_lHdSMR
      JIT  - 20060428_1800_r8
      GC   - 20060501_AA)
      JCL  - 20060511a
      [was@centos5was bin]$ ./java Test
      java.text.ParseException: Unparseable date: "09-Mrz-2008"
      	at java.text.DateFormat.parse(DateFormat.java:352)
      	at Test.main(Test.java:11)
      Parsed 09-Mär-2008 successfully
      

              Unassigned Unassigned
              andrew.myers Andrew Myers [Atlassian]
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: