How to properly format last modified (lastmod) time for xml sitemaps

后端 未结 6 469
礼貌的吻别
礼貌的吻别 2021-02-05 05:37

I am creating an app that will automatically update sitemap.xml each time new content is added to, or updated on the site.

According to Google\'s best pract

6条回答
  •  礼貌的吻别
    2021-02-05 06:40

    In PHP, you can use :

    $lastmod = date("Y-m-d\Th:m:s+00:00");
    

    This will display something like:

    2018-02-14T08:02:28+00:00
    

提交回复
热议问题