Closed wna-se closed 1 year ago
Replicated the problem and prepared a fix: https://github.com/enasequence/sequencetools/pull/135
Pending approval and integration testing.
The locale problem affecting dates has been fixed by using DateTimeFormatter (threadsafe) and setting the locale to UK. https://github.com/enasequence/sequencetools/commit/dfbc6cd10083b6fa109bb3aec977ef13d6cec0b5
Running validation on a FlatFile genome annotations with system locale set to sv_SE will fail with
ERROR: Invalid date: 23-FEB-2023 [ line: 9]
. Changing the locale to en_UK (e.g.java -Duser.language=en -Duser.country=UK
) and running the same command will pass the validation without the error.In FlatFileUtils.java I see that the defaultLocale is set to UK on line 236 and I assume this should happen before or as the dateMonYear object created (e.g. n
ew SimpleDateFormat("dd-MMM-yyyy", Locale.UK)
).