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

Dates are being formatted incorrectly for 26th December 2021 and above.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 8u212
    • Fix Version/s: None
    • Component/s: core-libs
    • Subcomponent:
    • CPU:
      generic
    • OS:
      os_x

      Description

      A DESCRIPTION OF THE PROBLEM :
      Wrong year is being printed when getting date in requested format.

      REGRESSION : Last worked in version 8u212

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      System.out.println(
            ZonedDateTime.of(2021, 12, 26, 0, 0, 0, 0, ZoneId.of("Europe/London")).format(DateTimeFormatter.ofPattern("d MMMM YYYY"))
          );

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      26 December 2021
      ACTUAL -
      26 December 2022

      ---------- BEGIN SOURCE ----------
      System.out.println(
            ZonedDateTime.of(2021, 12, 26, 0, 0, 0, 0, ZoneId.of("Europe/London")).format(DateTimeFormatter.ofPattern("d MMMM YYYY"))
          );
      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

          Activity

            People

            Assignee:
            psonal Pallavi Sonal (Inactive)
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: