Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-03-02 21:54:35 +01:00
commit b485f9c96a
2 changed files with 6 additions and 2 deletions

View file

@ -10,6 +10,7 @@ import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.TimeZone;
import java.util.zip.GZIPInputStream; import java.util.zip.GZIPInputStream;
import net.osmand.AndroidUtils; import net.osmand.AndroidUtils;
@ -182,7 +183,7 @@ public class DownloadOsmandIndexesHelper {
} }
} }
private static String reparseDate(Context ctx, String date) { protected static String reparseDate(Context ctx, String date) {
try { try {
Date d = simpleDateFormat.parse(date); Date d = simpleDateFormat.parse(date);
return AndroidUtils.formatDate(ctx, d.getTime()); return AndroidUtils.formatDate(ctx, d.getTime());

View file

@ -10,6 +10,7 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.TimeZone;
import net.osmand.IndexConstants; import net.osmand.IndexConstants;
import net.osmand.PlatformUtil; import net.osmand.PlatformUtil;
@ -218,7 +219,9 @@ public class IndexItem implements Comparable<IndexItem> {
entry.zipStream = zipStream; entry.zipStream = zipStream;
entry.unzipFolder = unzipDir; entry.unzipFolder = unzipDir;
try { try {
Date d = DateFormat.getDateFormat((Context) ctx).parse(date); final java.text.DateFormat format = DateFormat.getDateFormat((Context) ctx);
format.setTimeZone(TimeZone.getTimeZone("GMT+01:00"));
Date d = format.parse(date);
entry.dateModified = d.getTime(); entry.dateModified = d.getTime();
} catch (ParseException e1) { } catch (ParseException e1) {
log.error("ParseException", e1); log.error("ParseException", e1);