Solved

Getting DateTime.UtcNow off Latitude/Longitude/Date

Posted on 2012-04-12
2
421 Views
Last Modified: 2012-06-21
Good afternoon,

I'm attempting to get the sunrise/sunset based off a latitude and longitude and date.   I have most of it working, but I'm using the DateTime.UtcNow to accomodate for daylight savings and such.  However, I found out that when I run DateTime.UtcNow it gives me the UTC for where the SERVER is at.  I need to be able to get the information for where the latitude/longitude are at, and also for the date I pass the function.

Has anybody done this before?
0
Comment
Question by:TysonAllen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
SriVaddadi earned 500 total points
ID: 37844467
No classes or methods available to achieve this with in the .net BCL.

You have to use the external web services. There are some service providers who offer these time services.

Below are the links for some of them

http://www.earthtools.org/webservices.htm

http://www.geonames.org/
0
 

Author Comment

by:TysonAllen
ID: 37861093
I ended up having the user select their time zone manually when uploading the files, I tend to shy away from using external web services since if they go down or change it effects the whole application.

But since your answer is a possible solution and would have worked (not to mention the only response, thank you!) I'll mark yours as solution.

Thanks for the suggestion SriVaddadi
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question