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

hh in SimpleDateFormat documentation should be HH or 15 should be 03

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.2, 1.3.0
    • core-libs
    • generic
    • generic



      Name: skT45625 Date: 05/26/2000


      java version "1.2.2"
      Classic VM (build 1.2.2-L, green threads, nojit)

      See the following line in the JavaDoc documentation of SimpleDateFormat:

      "yyyy.MM.dd G 'at' hh:mm:ss z" ->> 1996.07.10 AD at 15:08:56 PDT

      hh should be HH or 15 should be 03. Also see my comment on bug 4175311.
      (Review ID: 105362)
      ======================================================================

      http://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html
      suresh.kondamareddy@eng 2000-05-26

      Name: rmT116609 Date: 12/01/2000


      01 Dec 2000, eval1127@eng -- see also #4175311
      -----
      C:\>java -version
      java version "1.2.2"
      Classic VM (build JDK-1.2.2-W, native threads, symcjit)

      The documentation page of the SimpleDateFormat class has the following lines:
      (---- start ----)

      Examples Using the US Locale:

       Format Pattern Result
       -------------- -------
       "yyyy.MM.dd G 'at' hh:mm:ss z" ->> 1996.07.10 AD at 15:08:56 PDT

      (---- end ----)

      I believe this is wrong because in the time format hh:mm:ss, "hh" denotes hours
      1-12, so it cannot be 15:08, but 03:08.
      (Review ID: 113125)
      ======================================================================

            nlindenbsunw Norbert Lindenberg (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: