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:
parent
f7bb0b1f20
commit
8c288a4ae1
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue