1

in the CP settings, timezone is set to UTC +1 Europe/Zurich when I try this code:

{% set currDay = now|date() %}
    {{ currDay|date('l d F Y') }}

it outputs "Mercredi, 16 janvier 2019", but we're still Tuesday 15th

Craft 3.0.37

jjem
  • 497
  • 2
  • 14

1 Answers1

1

Try

{% set currDay = now|date('M j, Y H:i:s') %}
{{ currDay }}

Applying the |date() filter to the now object when you set the variable currDay makes currDay a string. When you then try try to reapply |date() a second time, something funny must be happening..?

Oli
  • 7,495
  • 9
  • 17