statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.08k stars 533 forks source link

Date in entry listing is not localized #3787

Open aerni opened 3 years ago

aerni commented 3 years ago

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

jasonvarga commented 3 years ago

Yeah, not much we can do about it now.

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

aerni commented 3 years ago

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 commented 2 years ago

@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.

jasonvarga commented 2 years ago

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

aerni commented 2 years ago

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?