Permalink
Browse files

fix lastmod format

  • Loading branch information...
1 parent 3c3efdb commit 9472f9b04a850ac5da8cde76922fd05105cfadea @flyerhzm committed Apr 5, 2010
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/sitemap.rb
View
@@ -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

0 comments on commit 9472f9b

Please sign in to comment.