HADOOP-16048. ABFS: Fix Date format parser.
Contributed by Da Zhou.
This commit is contained in:
parent
6f0756fc0e
commit
00ad9e23e8
@ -40,6 +40,7 @@
|
||||
import java.util.HashSet;
|
||||
import java.util.Hashtable;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@ -845,7 +846,7 @@ private boolean parseIsDirectory(final String resourceType) {
|
||||
private long parseLastModifiedTime(final String lastModifiedTime) {
|
||||
long parsedTime = 0;
|
||||
try {
|
||||
Date utcDate = new SimpleDateFormat(DATE_TIME_PATTERN).parse(lastModifiedTime);
|
||||
Date utcDate = new SimpleDateFormat(DATE_TIME_PATTERN, Locale.US).parse(lastModifiedTime);
|
||||
parsedTime = utcDate.getTime();
|
||||
} catch (ParseException e) {
|
||||
LOG.error("Failed to parse the date {}", lastModifiedTime);
|
||||
|
Loading…
Reference in New Issue
Block a user