Changeset 834bfde


Ignore:
Timestamp:
Jun 6, 2009 4:34:32 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1202a303
Parents:
4c4b3b7
Message:
  • Timestamper: Use locale country if geoip unavailable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/time/Timestamper.java

    r4c4b3b7 r834bfde  
    33import java.util.ArrayList;
    44import java.util.List;
     5import java.util.Locale;
    56import java.util.StringTokenizer;
    67
     
    247248            serverList = DEFAULT_SERVER_LIST;
    248249            String country = _context.getProperty(PROP_IP_COUNTRY);
    249             if (country != null) {
     250            if (country == null) {
     251                country = Locale.getDefault().getCountry();
     252                if (country != null)
     253                    country = country.toLowerCase();
     254            }
     255            if (country != null &&  country.length() > 0) {
    250256                _priorityServers = new ArrayList(3);
    251257                for (int i = 0; i < 3; i++)
Note: See TracChangeset for help on using the changeset viewer.