Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-14766

Dateformat not localised

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • 14.6.0
    • None
    • cms
    • None
    • Quasar

    Description

      The DateField plugin in the CMS editor in View Mode takes the locale into account, but not sufficiently.

      org.hippoecm.frontend.plugins.standards.datetime.DatePrinter.JavaDatePrinter#print(java.time.format.DateTimeFormatter)

      ZonedDateTime dateTime = ZonedDateTime.ofInstant(this.instant, this.zoneId);
      formatter = formatter.withLocale(this.locale);
      return dateTime.format(formatter) + this.getSuffix();

       

      This correctly identifies my location as being Europe/London, but then uses the Locale "en" to load the formatter. This results in the US date format, rather than the UK date format. One of our UK customers noticed this and would like this fixed.

       

      Notice:

      dateTime.format(formatter.withLocale(Locale.ENGLISH)) = "August 4, 2021 2:11 PM"

      whereas

      dateTime.format(formatter.withLocale(Locale.UK)) = "04 August 2021 14:11" 

       

      CMS-10432 addressed a broader issue

      Attachments

        Activity

          People

            dionescu Daniel Ionescu
            wborgbarthet William Borg Barthet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: