Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #21 #22

Merged
merged 1 commit into from
Aug 20, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
Expand Down Expand Up @@ -102,7 +103,7 @@ public void run() {
public final static String LATEST_TIMESTAMP = "_LATEST";
public final static String OFF = "OFF";

protected SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
protected SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
protected Date startDate, endDate;

class BlockSize
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/archive/util/ArchiveUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public class ArchiveUtils {
private static ThreadLocal<SimpleDateFormat> threadLocalDateFormat(final String pattern) {
ThreadLocal<SimpleDateFormat> tl = new ThreadLocal<SimpleDateFormat>() {
protected SimpleDateFormat initialValue() {
SimpleDateFormat df = new SimpleDateFormat(pattern);
SimpleDateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
df.setTimeZone(TimeZone.getTimeZone("GMT"));
return df;
}
Expand Down Expand Up @@ -393,9 +393,9 @@ public static Date getDate(String d) throws ParseException {
}

final static SimpleDateFormat dateToTimestampFormats[] =
{new SimpleDateFormat("MM/dd/yyyy"),
new SimpleDateFormat("MM/yyyy"),
new SimpleDateFormat("yyyy")};
{new SimpleDateFormat("MM/dd/yyyy", Locale.ENGLISH),
new SimpleDateFormat("MM/yyyy", Locale.ENGLISH),
new SimpleDateFormat("yyyy", Locale.ENGLISH)};

/**
* Convert a user-entered date into a timestamp
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/archive/util/DateUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class DateUtils {
private static ThreadLocal<SimpleDateFormat> threadLocalDateFormat(final String pattern) {
ThreadLocal<SimpleDateFormat> tl = new ThreadLocal<SimpleDateFormat>() {
protected SimpleDateFormat initialValue() {
SimpleDateFormat df = new SimpleDateFormat(pattern);
SimpleDateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
df.setTimeZone(TimeZone.getTimeZone("GMT"));
return df;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.logging.Logger;

import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
Expand Down Expand Up @@ -156,7 +157,7 @@ public boolean isStaleChecking()
public long getModTime()
{
HTTPSeekableLineReader reader = null;
SimpleDateFormat lastModFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
SimpleDateFormat lastModFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);

try {
reader = get();
Expand Down