Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Getting DateTime.UtcNow off Latitude/Longitude/Date

Posted on 2012-04-12
2
Medium Priority
?
435 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
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 Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

972 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