{"id":2176,"date":"2009-08-12T14:45:28","date_gmt":"2009-08-12T18:45:28","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/?p=2176"},"modified":"2009-08-12T14:45:28","modified_gmt":"2009-08-12T18:45:28","slug":"w3c-time-format-and-strftime","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2009\/08\/12\/w3c-time-format-and-strftime\/","title":{"rendered":"W3C Time Format and strftime"},"content":{"rendered":"<p>In case anyone else runs into this \/ so I can Google it&#8230;<\/p>\n<p>W3C has <a href=\"http:\/\/www.w3.org\/TR\/NOTE-datetime\">their own time format<\/a>, and the specs for Sitemaps, at least, require its use. &#8220;1997-07-16T19:20:30+01:00&#8221; is an example. Yes, that&#8217;s a literal &#8220;T&#8221;.<\/p>\n<p>For people with a standard strftime(), &#8220;%FT%T%:z&#8221; appears to be what they expect.<\/p>\n<p>Edit: Google, at least, is exacting. %z gives something like &#8220;-0400&#8221; while the protocol calls for &#8220;-04:00&#8221;. The <tt>date<\/tt> manpage specifies that %:z will use the colon, but PHP&#8217;s strftime(), at least, does not support this. Bugger.<\/p>","protected":false},"excerpt":{"rendered":"<p>In case anyone else runs into this \/ so I can Google it&#8230; W3C has their own time format, and the specs for Sitemaps, at least, require its use. &#8220;1997-07-16T19:20:30+01:00&#8221; is an example. Yes, that&#8217;s a literal &#8220;T&#8221;. For people &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2009\/08\/12\/w3c-time-format-and-strftime\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2176","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/2176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=2176"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/2176\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=2176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=2176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=2176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}