hadoop-swiftfs: SimpleDateFormat is locale specific

Parse Last-Modified with US locale.
I got an Unparseable date exception when running under Swedish locale.

Change-Id: I90fafb9b042f5f0df1eeb7f8646846b378b47eca
This commit is contained in:
Ernst Sjöstrand 2016-06-01 16:44:18 +02:00
parent f7bb0b1f20
commit 8c288a4ae1
1 changed files with 1 additions and 1 deletions

View File

@ -255,7 +255,7 @@ public class SwiftNativeFileSystemStore {
length = Long.parseLong(header.getValue());
}
if (SwiftProtocolConstants.HEADER_LAST_MODIFIED.equals(headerName)) {
final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(PATTERN);
final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(PATTERN, Locale.US);
try {
lastModified = simpleDateFormat.parse(header.getValue()).getTime();
} catch (ParseException e) {