duanpengya7074 2012-09-13 02:57
浏览 22
已采纳

Smarty日期格式?

I am building an rss feed.

I need to output a date, I am passing though a date that the date_format function can understand, but I am not sure how to format the date so it fits with the RFC 822 standard.

I need to output a date like this: Tue, 10 Jun 2003 09:41:01 GMT

What format should I use, or is there another modifier?

  • 写回答

1条回答 默认 最新

  • duanjianxiu9400 2012-09-13 03:00
    关注

    From the PHP docs for DateTime:

    const string RFC822 = "D, d M y H:i:s O" ;
    

    The corresponding Smarty string should be "%a, %d %b %Y %H:%M:%S %z".

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?