Skip to content

[Bug] 🐞 Incorrect Dhuhr Prayer Time in Egypt  #59

@moha-b

Description

@moha-b

Describe the bug

The test for calculating prayer times in Egypt is failing due to an inconsistency in the Dhuhr prayer time.
Here's a breakdown of the issue:

Test Result:

Expected Dhuhr Time: 11:53 AM
Actual Dhuhr Time: 11:54 AM
Difference: 1 minute later than expected
The ASR prayer is also included, but the difference is 1 hour and 1 minute.

this is the successful state

test('Test Prayer Time in Egypt', () {
    final coordinates = Coordinates(26.0590358, 32.2320519);
    final date = DateComponents.from(DateTime.now());
    final params = CalculationMethod.egyptian.getParameters();
    params.madhab = Madhab.hanafi;

    final prayerTimes = PrayerTimes(coordinates, date, params);

    expect(DateFormat.jm().format(prayerTimes.fajr), '4:10 AM');
    expect(DateFormat.jm().format(prayerTimes.sunrise), '5:36 AM');
    expect(DateFormat.jm().format(prayerTimes.dhuhr),
        '11:54 AM'); // 11:53 based on Google
    expect(DateFormat.jm().format(prayerTimes.asr),
        '4:24 PM'); // 3:23 based on Google
    expect(DateFormat.jm().format(prayerTimes.maghrib), '6:11 PM');
    expect(DateFormat.jm().format(prayerTimes.isha), '7:27 PM');
  });

Screenshots

image

Environment

  • Dart Language Version: 3.3.3
  • Flutter Version: 3.19.5
  • Adhan-Dart Version: ^2.0.0+1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions