You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting Sunrise for Synday Australia for a given date.
The code returns sunrise on the following date.
(Local time is US Eastern time, and current time in Sydney is one day ahead - this might be affecting the calculation). Edit: After further checking, the local time is not relevant to the issue, see below.
The text was updated successfully, but these errors were encountered:
Testing for 12/29/2021, sunrise in Sydney Australia, (sunrise on 12/29 is 5:45:57 am local time). Sydney Australia is UTC +11
ITimeZone timeZone = new OlsonTimeZone("Australia/Sydney");
var location = new GeoLocation("Sydney Australia", -33.86, 151, 0, timeZone);
var czc = new ComplexZmanimCalendar(DateTime.Parse("2021-12-29"), location);
GetTimeUtc returns 18.76... which is the UTC time of sunrise. (When it is sunrise in Sydney on 12/29 it is still 12/28 UTC)
GetDateFromTime converts 18.76 to 6:45pm on the selected date of 12/29, and then adjusts for local time by adding 11 hrs, so it returns 12/30/2021 5:45am. (it would seem that the time is correct for 12/29 not for 12/30).
This issue should not affect GetSunsetTime (since sunset in Syndey on 12/29 is also 12/29 UTC), but GetSunsetTime also calls GetSunriseTime and then calls GetAdjustedSunsetDate which adds a day to the sunset because it is now a day before the incorrectly adjusted sunrise.
Same issue affects Tzais, etc.
So I see the issue, not sure what is the best approach for fixing it.
Hi
Getting Sunrise for Synday Australia for a given date.
The code returns sunrise on the following date.
(Local time is US Eastern time, and current time in Sydney is one day ahead - this might be affecting the calculation). Edit: After further checking, the local time is not relevant to the issue, see below.
The text was updated successfully, but these errors were encountered: