Google Sitemap Date Format

前端 未结 10 1753
情书的邮戳
情书的邮戳 2021-02-12 09:35

I need date format for sitemaps in php.

How can i do that ?

Is this output right ?

2012-08-02EEST18:01:18+03:00
         


        
10条回答
  •  长发绾君心
    2021-02-12 10:19

    If you have the timestamp you can format the date correctly like this:

    
    

    Time stamp could be time() (for current time) or some other method of fetching a unix tiemstamp like strtotime()

提交回复
热议问题