tag:blogger.com,1999:blog-6100511197805579796.post2540274025018483568..comments2024-02-14T18:43:36.096+01:00Comments on Davide Gironi blog: Finding TimeZone by Latitude / Longitude using a TimeZone Shapefile with .NETDavide Gironihttp://www.blogger.com/profile/16366076989473118278noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6100511197805579796.post-34122886691229827892016-01-21T22:00:06.054+01:002016-01-21T22:00:06.054+01:00Hello, you can find an update versione (1.0.0.2), ...Hello, you can find an update versione (1.0.0.2), which contains also a Iana to Windows timezone Id. Once you have converted the iana to windows timezone using the Find method from IanaToWindowsTimeZoneMapper class, you can get offset by calling TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(yourwindowsidstring);<br />var offset = timezone.BaseUtcOffset;Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-15007627591881919712016-01-20T08:37:44.159+01:002016-01-20T08:37:44.159+01:00Beautiful, concise code!
The solution compiled an...Beautiful, concise code!<br /><br />The solution compiled and run without issue - sadly not always the case these days!<br /><br />I wondered - is there a way of finding the time offset for a zone? I'm writing a program that produces a sunrise/sunset chart for the year at a given lat/long, but the calculations (aCos out of range) go squify for absolute longitudes > 100. So I've been looking for a solution that provides the time offset. (-11 to +11 hours)<br /><br />Could you spare a few minutes to help me out?SarahChttps://www.blogger.com/profile/06827671322238669566noreply@blogger.com