Zverik / Level0

Web-based OpenStreetMap Editor
http://level0.osmz.ru
Do What The F*ck You Want To Public License
53 stars 14 forks source link

Timestamp format in OSM export changes when modifying objects #30

Closed simon04 closed 7 years ago

simon04 commented 7 years ago
  1. Open http://level0.osmz.ru/?url=node/93515942
  2. Download osm file
  3. Delete a few tags
  4. Download osm file

File from step 2:

  <node id='93515942' version='5' lat='47.2357170' lon='11.2999641' user='simon04' uid='57945' changeset='10975714' timestamp='2012-03-14T09:18:29Z'>

File from step 4:

  <node id='93515942' version='5' lat='47.2357170' lon='11.2999641' action='modify' timestamp='2016-09-26T06:45:49+0000'>

Instead of writing timestamp='2016-09-26T06:45:49+0000', write timestamp='2016-09-26T06:45:49Z' since +0000 is invalid according to https://www.w3.org/TR/xmlschema-2/#dateTime-timezones

This behavior breaks reading the OSM file in JOSM, see https://josm.openstreetmap.de/ticket/13690

Zverik commented 7 years ago

Oh my, php indeed rulez. Fixed in c293dcd0fdb9727e15ef60fcca3451a6b2a450d3 Thanks, Simon!

simon04 commented 7 years ago

Thank you a lot for the quick fix, Ilya!