v1.4.1: fixed date formats varying by locale
This commit is contained in:
@@ -83,6 +83,7 @@ import com.watabou.utils.SparseArray;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
@@ -207,7 +208,7 @@ public class Dungeon {
|
||||
if (daily) {
|
||||
//Ensures that daily seeds are not in the range of user-enterable seeds
|
||||
seed = SPDSettings.lastDaily() + DungeonSeed.TOTAL_SEEDS;
|
||||
DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT, Locale.ROOT);
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd", Locale.ROOT);
|
||||
format.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||
customSeedText = format.format(new Date(SPDSettings.lastDaily()));
|
||||
} else if (!SPDSettings.customSeed().isEmpty()){
|
||||
|
||||
@@ -45,6 +45,7 @@ import com.watabou.utils.FileUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
@@ -91,7 +92,7 @@ public enum Rankings {
|
||||
rec.version = "";
|
||||
}
|
||||
|
||||
DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT, Locale.ROOT);
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd", Locale.ROOT);
|
||||
rec.date = format.format(new Date(Game.realTime));
|
||||
|
||||
rec.cause = cause;
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.watabou.noosa.ui.Component;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
@@ -95,7 +96,7 @@ public class WndDailies extends Window {
|
||||
top = (int) score.bottom() + 6;
|
||||
|
||||
NumberFormat num = NumberFormat.getInstance(Locale.US);
|
||||
DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT, Locale.ROOT);
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd", Locale.ROOT);
|
||||
format.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||
Date date = new Date();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user