Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8226729

Time pattern used for locale en_ZA (South Africa) isn't correct

    Details

    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE PROBLEM :
      According to https://en.wikipedia.org/wiki/Date_and_time_notation_in_South_Africa "South Africa signed up to use ISO 8601 for date and time representation through national standard ARP 010:1989 in 1998.". ISO 8601 uses the 24h clock system. When creating localized time information with the south african locale a 12h time output instead of a 24h variant is created.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      System.out.println(((SimpleDateFormat)SimpleDateFormat.getTimeInstance(DateFormat.SHORT, new Locale("en","za"))).toPattern());

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      HH:mm
      ACTUAL -
      h:mm a

      ---------- BEGIN SOURCE ----------
      import java.text.DateFormat;
      import java.text.SimpleDateFormat;
      import java.util.Locale;

      public class SouthAfricaTimePatternOutput {

      public static void main(final String[] args) {
      System.out.println(((SimpleDateFormat)SimpleDateFormat.getTimeInstance(DateFormat.SHORT, new Locale("en","za"))).toPattern());
      }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              ljiang Leo Jiang
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: