Skip to content

Incorrect sunrise time #14

@JCDubs

Description

@JCDubs

Hi Mike,

I am trying to get the sunrise time for today using your calculator. I have looked at a couple of sources to get the official sunrise time for today and all confirm the time to be about 5:32 AM. When I run the calculator with the same date and location it produces a sunrise time exactly 2 hours behind (3:32AM). The code and setup is as follows:

Location location = new Location("-3.581405","53.284355");
SunriseSunsetCalculator sunriseSunsetCalculator = new SunriseSunsetCalculator(location, TimeZone.getTimeZone("Europe/London"));
String sunriseTimeString = sunriseSunsetCalculator.getOfficialSunriseForDate(GregorianCalendar.getInstance(TimeZone.getTimeZone("Europe/London")));

Does the above code look correct to you? Can you think of any reasons why this would happen with the above code?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions