Solved

Getting DateTime.UtcNow off Latitude/Longitude/Date

Posted on 2012-04-12
2
413 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 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now