Skip to content

Conversation

@Kneke
Copy link

@Kneke Kneke commented Aug 10, 2022

…ulations of the SolarEventCalculator

Example for a wrong sunset time with an offset of two hours would be:
Location erdingGermany = new Location(48.3107657, 11.8759098);
TimeZone timeZone = TimeZone.getTimeZone("Europe/Berlin");
SunriseSunsetCalculator calculator = new SunriseSunsetCalculator(erdingGermany, timeZone);

           Calendar calendar = Calendar.getInstance();
           calendar.set(2022, Calendar.JUNE, 21);

           String resultAsString = calculator.getOfficialSunsetForDate(calendar);

           assertEquals("21:17", resultAsString); // But was 15:17

…ulations of the SolarEventCalculator

Example for a wrong sunset time with an offset of two hours would be:
               Location erdingGermany = new Location(48.3107657, 11.8759098);
               TimeZone timeZone = TimeZone.getTimeZone("Europe/Berlin");
               SunriseSunsetCalculator calculator = new SunriseSunsetCalculator(erdingGermany, timeZone);

               Calendar calendar = Calendar.getInstance();
               calendar.set(2022, Calendar.JUNE, 21);

               String resultAsString = calculator.getOfficialSunsetForDate(calendar);

               assertEquals("21:17", resultAsString); // But was 15:17
@Kneke Kneke mentioned this pull request Aug 10, 2022
@Kneke
Copy link
Author

Kneke commented Aug 10, 2022

PR for this issue #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant