Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix lastmod format

  • Loading branch information...
commit 9472f9b04a850ac5da8cde76922fd05105cfadea 1 parent 3c3efdb
@flyerhzm authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/sitemap.rb
View
3  lib/sitemap.rb
@@ -55,12 +55,11 @@ def to_xml(target)
xml = Builder::XmlMarkup.new(:target => target, :indent => 2)
xml.instruct!
xml.urlset(:xmlns => "http://www.sitemaps.org/schemas/sitemap/0.9") do
- now = Time.now.strftime("%Y-%m-%d")
@@results.each do |result|
xml.url do
xml.loc(@@host + result[:location])
xml.priority result[:priority]
- xml.lastmod (result[:lastmod] || Time.now).strftime("%Y/%m/%d")
+ xml.lastmod((result[:lastmod] || Time.now).strftime("%Y-%m-%d"))
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.