# Twig Konfiguration anpassen (twig.yml)

**URL:** https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998
**Category:** Allgemein
**Created:** [18. August 2020 um 05:05 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998 "2020-08-18T05:05:09Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)
#### Post date: [18. August 2020 um 05:05 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998/1 "2020-08-18T05:05:09Z")

</div>

Hallo.

Gibt es in SW6 eine Möglichkeit die generelle Twig Konfiguration anzupassen? Vielleicht über die .env-Datei? Es geht mir um das generell Datumsformat und auch im speziellen um die Zeitzone. Ich will nicht in jedem E-Mail Template das Format von |date zu |date(‚d.m.Y H:i‘, ‚Europe/Berlin‘) anpassen zu müssen damit auch die Uhrzeit stimmt und nicht aktuell - 2h ausgiebt.

In Symfony lässt sich das über die twig.yml regeln. Gibt es in SW6 ähnliche Möglichkeiten? Konnte leider keine Infos darüber finden.

```
twig:
    date:
        format: d.m.Y, H:i
        timezone: Europe/Berlin

```

&nbsp;

Und vielleicht auch noch die generelle Zeitzone für das System denn alle Log-Ausgaben zeigen aktuelle Uhrzeit - 2h an.

&nbsp;

Danke und Gruß&nbsp;

Mike

---

<div class="post-metadata">

### Author: ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)
#### Post date: [18. August 2020 um 06:29 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998/2 "2020-08-18T06:29:57Z")

</div>

Das passiert in Shopware automatisch durch den Timezone Cookies des Users

---

<div class="post-metadata">

### Author: ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)
#### Post date: [18. August 2020 um 06:36 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998/3 "2020-08-18T06:36:37Z")

</div>

Hallo Mike,

du kannst deine twig.yaml einfach hier ablegen:&nbsp;[production/config/packages at 6.3 · shopware/production · GitHub](https://github.com/shopware/production/tree/6.3/config/packages)

Viele Grüße aus Schöppingen

![cool](http://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/shopware.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

### Author: ![Ben\_Rojek](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/ben_rojek/32/22747_2.png) [@Ben\_Rojek](https://forum.shopware.com/u/Ben_Rojek)
#### Post date: [18. August 2020 um 06:59 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998/4 "2020-08-18T06:59:02Z")

</div>

Wir haben ein ähnliches Problem.  
Alle Logs, bzw. erfassten Zeiten sind immer -2 Stunden.  
Gibt es hierfür eine einfache Lösung bzw. schon ein Ticket?

---

<div class="post-metadata">

### Author: ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)
#### Post date: [18. August 2020 um 07:19 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998/5 "2020-08-18T07:19:33Z")

</div>

Alle Zeiten werden in UTC gespeichert geloggt.&nbsp; Das ist bewusst so und kann nicht einfach geändert. Es sollte aber bei der Ausgabe im Frontend / Admin anpassen an die Lokale Zeitzone

---

<div class="post-metadata">

### Author: ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)
#### Post date: [18. August 2020 um 10:52 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998/6 "2020-08-18T10:52:49Z")

</div>

Danke für die zahlreichen Antworten! 🙂 [@Michael Telgmann]([http://forum.shopware.com/profile/17553/Michael](http://forum.shopware.com/profile/17553/Michael) Telgmann „Michael Telgmann“)‍ Ich habe meine twig.yaml unter /config/packages/twig.yaml abgelegt. Dort liegt auch die shopware.yaml. Cache geleert etc. aber die Uhrzeit ist immer noch falsch… Was mache ich falsch? ☹

---

<div class="post-metadata">

### Author: ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)
#### Post date: [27. August 2020 um 06:13 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998/7 "2020-08-27T06:13:59Z")

</div>

Kann hier niemand weiterhelfen? Die abgelegte twig.yaml scheint nicht gelesen zu werden. Zumindest ist das Datum in den E-Mail immer noch - 2 Std.

&nbsp;

```
twig:
  date:
    format: d.m.Y, H:i:s
    timezone: Europe/Berlin

```

&nbsp;

Gruß

---

<div class="post-metadata">

### Author: ![webseitenbeauftragte](https://avatars.discourse-cdn.com/v4/letter/w/a6a055/32.png) [@webseitenbeauftragte](https://forum.shopware.com/u/webseitenbeauftragte)
#### Post date: [7. April 2021 um 07:18 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998/8 "2021-04-07T07:18:42Z")

</div>

Servus MikeB

hast Du das Problem lösen können?  
Ich habe mit der Version 6.3.5.2 auch das Problem.

Bspw. bei Rabatten & Aktionen  
Angelegt so:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/5/5297a10adb4f9f823592ac19b756883f75ba35bf.png)

Ausgabe so  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/d/dd48867d580a9dc1da81438c1cf4d5e76bae42e5.png)

---

<div class="post-metadata">

### Author: ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)
#### Post date: [7. April 2021 um 08:13 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998/9 "2021-04-07T08:13:30Z")

</div>

Hi Du.

Ne hatte damals alles nicht funktioniert. Keine Ahnung was ich da falsch gemacht hab. In den neuen Shopware Versionen passt es bei mir. Sorry hätte gerne weitergeholfen.

Gruß Mike

---

<div class="post-metadata">

### Author: ![futureplex](https://avatars.discourse-cdn.com/v4/letter/f/7cd45c/32.png) [@futureplex](https://forum.shopware.com/u/futureplex)
#### Post date: [22. Juli 2021 um 08:05 UTC](https://forum.shopware.com/t/twig-konfiguration-anpassen-twig-yml/68998/10 "2021-07-22T08:05:50Z")

</div>

Bei uns das gleiche Problem. Irgendwer hier der schon eine Lösung gefunden hat?
