From dcac9dfeca26b38d3a5eb16a2b0276b0e7619e22 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 26 Jun 2007 23:21:20 +0000 Subject: [PATCH 1/1] Treat a timestamp that can't be parse as if it didn't exist. --- lib/osm.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/osm.rb b/lib/osm.rb index dea48cc71..77b07ce3d 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -101,8 +101,11 @@ module OSM parser.listen( :characters, %w{ time } ) do |text| if text && text != '' - date = DateTime.parse(text) - gotdate = true + begin + date = DateTime.parse(text) + gotdate = true + rescue + end end end -- 2.43.2