Cleaner datetime localization for xml output

This commit is contained in:
echarp 2017-12-25 21:12:30 +01:00
parent c76c46a104
commit 32298c4980
2 changed files with 3 additions and 2 deletions

View File

@ -4,8 +4,8 @@ xml.events do
@events.find_each do |event|
xml.event do
xml.title event.title
xml.tag! 'start-time', event.start_time.strftime('%Y/%m/%d %T')
xml.tag! 'end-time', event.end_time.strftime('%Y/%m/%d %T')
xml.tag! 'start-time', l(event.start_time, format: 'xml')
xml.tag! 'end-time', l(event.end_time, format: 'xml')
xml.place_name event.place_name
xml.address event.address
xml.city event.city

View File

@ -9,3 +9,4 @@ fr:
formats:
at: '%A %e %B %Y à %Hh%M'
hours: '%Hh%M'
xml: '%Y/%m/%d %T'