mirror of https://github.com/quasar/Quasar.git
Added Timezon to geolocation fallback
This commit is contained in:
parent
31232720c0
commit
41ece996b9
|
@ -139,6 +139,7 @@ namespace xClient.Core.Helper
|
||||||
string xmlCountryCode = doc.SelectSingleNode("Response//CountryCode").InnerXml;
|
string xmlCountryCode = doc.SelectSingleNode("Response//CountryCode").InnerXml;
|
||||||
string xmlRegion = doc.SelectSingleNode("Response//RegionName").InnerXml;
|
string xmlRegion = doc.SelectSingleNode("Response//RegionName").InnerXml;
|
||||||
string xmlCity = doc.SelectSingleNode("Response//City").InnerXml;
|
string xmlCity = doc.SelectSingleNode("Response//City").InnerXml;
|
||||||
|
string timeZone = doc.SelectSingleNode("Response//TimeZone").InnerXml;
|
||||||
|
|
||||||
GeoInfo.ip = (!string.IsNullOrEmpty(xmlIp))
|
GeoInfo.ip = (!string.IsNullOrEmpty(xmlIp))
|
||||||
? xmlIp
|
? xmlIp
|
||||||
|
@ -155,6 +156,11 @@ namespace xClient.Core.Helper
|
||||||
GeoInfo.city = (!string.IsNullOrEmpty(xmlCity))
|
GeoInfo.city = (!string.IsNullOrEmpty(xmlCity))
|
||||||
? xmlCity
|
? xmlCity
|
||||||
: "Unknown";
|
: "Unknown";
|
||||||
|
GeoInfo.timezone = (!string.IsNullOrEmpty(timeZone))
|
||||||
|
? timeZone
|
||||||
|
: "Unknown";
|
||||||
|
|
||||||
|
GeoInfo.isp = "Unknown"; // freegeoip does not support ISP detection
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue