cms icon indicating copy to clipboard operation
cms copied to clipboard

Date in entry listing is not localized

Open aerni opened this issue 3 years ago • 5 comments

Bug Description

The date is not localized in the entry listing. It displays 18. May 2021 13:17. It should be 18. Mai 2021 13:17 instead. The date is localized correctly in the fieldtype itself.

How to Reproduce

  1. Set 'date_format' => 'j. F Y' in the cp.php config

  2. Create a user and add a locale setting:

preferences:
  locale: de
  1. Add this field to your blueprint:
handle: pledge_date
field:
  type: date
  required: true
  validate:
    - required
  display: Date
  listable: true
  mode: single
  time_enabled: true
  time_required: true
  earliest_date: '2021-01-01'
  full_width: false
  inline: false
  columns: 1
  rows: 1
  read_only: true
  format: U
  instructions: 'The time this pledge was made'
  width: 50
  1. Create an entry and set a date
  2. Look at the date in the entry listing

Extra Detail

Bildschirmfoto 2021-05-29 um 12 07 29 PM

Environment

Statamic 3.1.18 Pro Laravel 8.44.0 PHP 7.4.16 aerni/social-links 2.2.0 jonassiewertsen/statamic-livewire 2.5.0 visuellverstehen/statamic-classify 2.1.1

aerni avatar May 29 '21 10:05 aerni

Yeah, not much we can do about it now.

That's the whole point of https://github.com/statamic/ideas/issues/551

jasonvarga avatar May 29 '21 17:05 jasonvarga

Sorry, I don't think I follow. In the opening comment of the idea you're saying the date would be localized. How is this not a bug?

This is the entry listing: Bildschirmfoto 2021-05-31 um 8 34 37 AM

This is the entry fieldtype: Bildschirmfoto 2021-05-31 um 8 34 17 AM

aerni avatar May 31 '21 06:05 aerni

@jasonvarga I stumbled upon this in a new project again. Only to find my own issue here, lol. Maybe I misunderstood you. Are you saying this can't be fixed until statamic/ideas#551 is implemented? Or that you don't think that this is a bug?

To clarify the issue again. The date in the entry listing doesn't take the date setting into account.

aerni avatar Jul 22 '22 17:07 aerni

Yeah, can't/won't. Probably a fair amount of effort involved in fixing this, equal to addressing that issue completely.

jasonvarga avatar Jul 22 '22 19:07 jasonvarga

Ok, thanks for clarifying. Should this issue be opened again to keep track of it? As it is a bug that should be addressed at some point?

aerni avatar Jul 22 '22 19:07 aerni