CSVSaveService defaults to using DEFAULT_DATE_FORMAT_STRING = "MM/dd/yy HH:mm:ss" if the date does not parse as milliseconds. This is not very helpful: - it does not correspond with the suggested default in jmeter.properties, which is now yyyy/MM/dd HH:mm:ss.SSS - the code does not check that the format actually works. It would be a lot better if the format were at least checked to see if it worked before proceeding to use it. Also it ought to be possible to compare the date field with some common formats and select one that works. Likely input formats include: yyyy/MM/dd HH:mm:ss[.SSS] yyyy-MM-dd HH:mm:ss[.SSS] yyyyMMdd HH:mm:ss[.SSS] All the above should be easy to detect unambiguously. However, if the file uses MM/dd/yy HH:mm:ss (US format) as per the current code, it won't in general be possible to distinguish it from dd/MM/yy HH:mm:ss (as used in Europe). In this case, the format would need to be provided as a property.
(In reply to comment #0) > - the code does not check that the format actually works. Not strictly true: it does check that the format parses the timestamp. However, the created DateFormat instance is lenient, and may match only part of the timestamp string. For example, MM/dd/yy HH:mm:ss happily matches 2013/01/19 20:55:07 but parses it as 1 Sep 2186 19:55:07 GMT.
URL: http://svn.apache.org/viewvc?rev=1436725&view=rev Log: CSVSaveService does not handle date parsing very well Bugzilla Id: 54459 Modified: jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/listeners.xml Did not implement the following formats: yyyyMMdd HH:mm:ss[.SSS]
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3041