So what exactly went wrong? Our Windows batch script used the current date and time to compose a file name, which was then passed as an argument to a Java application. So far so good. But why does it fail before 10 a.m?
We get a leading zero for days and a space for one-digit hours! This explains why our script failed:
$ java -jar application.jar 2015-05-08- 9-34.txt