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