hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [hadoop] branch trunk updated: HADOOP-16048. ABFS: Fix Date format parser.
Date Tue, 22 Jan 2019 16:41:55 GMT
This is an automated email from the ASF dual-hosted git repository.

stevel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 00ad9e2  HADOOP-16048. ABFS: Fix Date format parser.
00ad9e2 is described below

commit 00ad9e23e88d1e1b1f887b6c9473a7a924a95a97
Author: Da Zhou <da.zhou@microsoft.com>
AuthorDate: Tue Jan 22 16:40:42 2019 +0000

    HADOOP-16048. ABFS: Fix Date format parser.
    
    Contributed by Da Zhou.
---
 .../java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
index 2a058c7..5c28bd4 100644
--- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
+++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
@@ -40,6 +40,7 @@ import java.util.HashMap;
 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 @@ public class AzureBlobFileSystemStore {
   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);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message