Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Getting DateTime.UtcNow off Latitude/Longitude/Date

Posted on 2012-04-12
2
Medium Priority
?
430 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 1500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

718 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