Skip to content

Unexpected result using {{ date }} and setting 'localize_dates_in_modifiers' => false #13869

@helloDanuk

Description

@helloDanuk

Bug description

I am not sure if this is a bug, but it confused me. 'localize_dates_in_modifiers' => false, behaves differently for {{ date }} depending on how the variable is used in the template.

Use case:

{{ date }} => variable from dated collection
{{ second_date }} => just an other date fieldtype

Image

How to reproduce

Now, for {{ date }} it depends on whether the following template is used with or without the underlined first line of text:

display_timezone is set to: 'display_timezone' => 'Europe/Zurich',

Image

With first text line

'localize_dates_in_modifiers' => false

Why not 18:25? …as described here

Image

'localize_dates_in_modifiers' => true

Expected behaviour

Image

Without first text line

'localize_dates_in_modifiers' => false

Expected behaviour

Image

'localize_dates_in_modifiers' => true

Expected behaviour

Image

Logs

Environment

Environment
Application Name: Statamic
Laravel Version: 12.50.0
PHP Version: 8.3.30
Composer Version: 2.9.3
Environment: local
Debug Mode: ENABLED
URL: date-test.test
Maintenance Mode: OFF
Timezone: UTC
Locale: de_CH

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.2.4 PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions