Zum Inhalt springen

Datumsformatierung im RSS-Feed bei tx_news

Erstellt am 13. Februar 2014 · 2 Antworten · letzte Antwort am 14. Februar 2014

Tags: tx_news, TYPO3 6.x, Frage

SirRuddy ·

Hallo!

Ich verzweifle etwas an der Datums-Formatierung des RSS-Feeds. Der sich weigert das deutsche Datumsformat aufzugeben.
Es ist ja so, dass sich das Template: /fileadmin/typo3conf/ext/news/Resources/Private/Partials/List/Item.html über Fluid das Datum so holt:

<n:format.date format="{f:translate(key:'dateFormat')}">{newsItem.datetime}</n:format.date>

Und zwar aus der locallang.xml anhand von "dateFormat". Wenn ich jetzt mittel Typoscript die Übersetzung manipuliere:

plugin.tx_news._LOCAL_LANG.de.dateFormat = %Y-%m-%d

Dann behält der RSS-Feed das deutsche Datumsformat aus der locallang.xml (%d-%m-%Y) bei.
So rendere ich den Feed:

### RSS-Feed ###

[globalVar = TSFE:type = 100]
config {
  disableAllHeaderCode = 1
  xhtml_cleaning = none
  admPanel = 0
  metaCharset = utf-8
  additionalHeaders = Content-Type:text/xml;charset=utf-8
  disablePrefixComment = 1
}

pageNewsRSS = PAGE
pageNewsRSS {
  typeNum = 100
  10 < tt_content.list.20.news_pi1
  10 {
    switchableControllerActions {
      News {
        1 = list
      }
    }
    settings < plugin.tx_news.settings
    settings {
      limit = 15
      format = xml
    }
  }
}
[global]

Was mache ich falsch? - Alle Caches wurden mehrfach gelöscht.

Gruß
SirRuddy

Schweriner · · Beste Antwort

In meinem RSS Template (List.xml) steht Hardcoded das Datumsformat drin. Pass es einfach an.

So stehts in List.xml

<pubDate><n:format.date format="%a, %d %b %Y %T %z" currentDate="1" strftime="1">{newsItem.datetime}</n:format.date></pubDate>