You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Severity: normal
OS: Windows XP
The text was updated successfully, but these errors were encountered:
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.
Sebb (Bug 54459):
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 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.
Severity: normal
OS: Windows XP
The text was updated successfully, but these errors were encountered: