﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
21021	Using date:* in the Download Query Wizard prevents JOSM from loading data	dafadllyn	Don-vip	"==== What steps will reproduce the problem?
1. Open JOSM
2. Click on ''Download data''
3. Click on ''Download from Overpass API''
4. Click on ''Query Wizard''
5. Enter 
{{{
amenity=post_box and newer:""2021-05-30T20:00:00Z"" and type:node in ""Kanton Bern""
}}}
6. Click on ''Build query and execute''

==== What is the expected result?

It should load the data.

==== What happens instead?

JOSM reports: ""An unexpected exception occurred.""

==== Please provide any additional information below. Attach a screenshot if possible.

It seems the problem is that the wizard creates a wrong query:

{{{
[out:xml][timeout:90];
{{geocodeArea:Kanton Bern}}->.searchArea;
(
  node[""amenity""=""post_box""](newer:""{{date:2021-05-30T20:00:00Z}}"")(area.searchArea);
);
(._;>;);
out meta;
}}}

It should be

{{{
(newer:""2021-05-30T20:00:00Z"")
}}}

instead of

{{{
(newer:""{{date:2021-05-30T20:00:00Z}}"").
}}}

After correcting the query, JOSM loaded the data.

{{{
Revision:17919
Build-Date:2021-06-02 20:30:01

Identification: JOSM/1.5 (17919 en) Mac OS X 10.13.6
OS Build number: Mac OS X 10.13.6 (17G14042)
Memory Usage: 155 MB / 1024 MB (41 MB allocated, but free)
Java version: 16.0.1+9, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 69677504 1280×800 (scaling 1.00×1.00)
Maximum Screen Size: 1280×800
Best cursor sizes: 16×16→16×16, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_CH
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=17919, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=/Applications/JOSM.app/Contents/MacOS/JOSM]

Plugins:
+ reverter (35732)
+ undelete (35640)
+ utilsplugin2 (35691)

Last errors/warnings:
- 00251.666 E: Handled by bug report queue: java.time.format.DateTimeParseException: Text cannot be parsed to a Duration
- 00294.798 E: Handled by bug report queue: java.time.format.DateTimeParseException: Text cannot be parsed to a Duration
- 00309.829 E: Handled by bug report queue: java.time.format.DateTimeParseException: Text cannot be parsed to a Duration



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (25) of main
java.time.format.DateTimeParseException: Text cannot be parsed to a Duration
	at java.base/java.time.Duration.parse(Unknown Source)
	at org.openstreetmap.josm.io.OverpassDownloadReader.date(OverpassDownloadReader.java:275)
	at org.openstreetmap.josm.io.OverpassDownloadReader.expandExtendedQueries(OverpassDownloadReader.java:208)
	at org.openstreetmap.josm.io.OverpassDownloadReader.getRequestForBbox(OverpassDownloadReader.java:190)
	at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:194)
	at org.openstreetmap.josm.io.OverpassDownloadReader.parseOsm(OverpassDownloadReader.java:389)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:462)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:470)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
}}}
"	defect	closed	normal	21.06	Core		fixed	template_report overpass download	simon04
