PHPプログラムに関する各種メモ書き

Smartyを使ってRSS用日付を表示させる

■ 日付表示の基本

{$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
 ↓
2007-07-04 18:00:00

■ RSS用 日付表示

<pubDate>{$date|date_format:"%a, %d %b %Y %H:%M:%S"} +0900</pubDate> 

■ RSS用 日付表示(現在の日付を表示する場合)

<pubDate>{$smarty.now|date_format:"%a, %d %b %Y %H:%M:%S"} +0900</pubDate>
↓
<pubDate>Fri, 27 May 2011 14:13:13</pubDate>

関連エントリー

No.289
06/30 15:28

edit

Smarty
日付