Fix geodb download with Arabic language

This commit is contained in:
emanuele-f
2025-04-25 16:51:32 +02:00
parent c7f181f599
commit 397c499440
@@ -33,6 +33,7 @@ import java.io.IOException;
import java.net.InetAddress;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/* A class to query geolocation info from IP addresses. */
public class Geolocation {
@@ -109,7 +110,7 @@ public class Geolocation {
@SuppressLint("SimpleDateFormat")
public static boolean downloadDb(Context ctx) {
String dateid = new SimpleDateFormat("yyyy-MM").format(new Date());
String dateid = new SimpleDateFormat("yyyy-MM", Locale.US).format(new Date());
String country_url = "https://download.db-ip.com/free/dbip-country-lite-" + dateid + ".mmdb.gz";
String asn_url = "https://download.db-ip.com/free/dbip-asn-lite-" + dateid + ".mmdb.gz";