Link to home
Start Free TrialLog in
Avatar of TysonAllen
TysonAllen

asked on

Getting DateTime.UtcNow off Latitude/Longitude/Date

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?
ASKER CERTIFIED SOLUTION
Avatar of Ravi Vaddadi
Ravi Vaddadi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TysonAllen
TysonAllen

ASKER

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