English 中文(简体)
离开城市和州/省或泽西省的时间区
原标题:Get Timezone Offset From City and State/Province or Zip

我拥有一个星号网站,该网站将使用无害环境技术的服务器,并有可能在无害环境技术的计算机/计算机上安装。 用户将更新有关北美各地的信息。 我需要在当地时间提供最新情况,而不是服务器或计算机时间。 因此,我需要能够根据城市和州/省或泽西法获得一个地点的抵销。 http://www.earthtools.org/webservices.htm#timezone”rel=“nofollow”http://www.earthtools.org/webservices.htm#time 这需要自由度和长度,我没有。

最佳回答

你们可以从谷歌地图上退休。

例如,地址是123街、洛杉矶、CA 12345号或地址,只有12346

public void GetCoordinate(string address)
{
    WebClient client = new WebClient();
    Uri uri = new Uri(String.Format("http://maps.google.com/maps/geo?output=csv&q=" + HttpUtility.UrlEncode(address)));

    // Return numbers -
    // 1 = Status Code
    // 2 = Accurancy
    // 3 = Latitude
    // 4 = Longitude
    string[] geocodeInfo = client.DownloadString(uri).Split( , );

    decimal latitude = Convert.ToDecimal(geocodeInfo[2]);                
    decimal longitude = Convert.ToDecimal(geocodeInfo[3]);            
}

我建议节省美洲金枪鱼委创造/延长的时间。 当你展示时,根据用户时区抵消(在用户简介中节省)将电离层转换为用户时段。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签