Connecting mosques and communities
📖 Help Center & User Manual · Documentation Version 1.0

Kariahku.com User Manual & Help Center

Official step-by-step documentation for the Kariahku.com Multi-Tenant Mosque Management System.

Kariahku.com Multi-Tenant Mosque Management System

SECTION 8 — Section 8: Prayer Times Management

Official step-by-step documentation for the Kariahku.com Multi-Tenant Mosque Management System.

Documentation Version: 1.0
Generated On: 2026-12-05 00:44 UTC
Articles: 2

Table of Contents

  1. [SEC-08A] Mosque Prayer Time Zone Configuration & Daily/Monthly Display (/mosque-admin/prayer & /prayer-times) — Section 8: Prayer Times Management
  2. [SEC-08B] Automatic Prayer Time Sync, JAKIM e-Solat Source & Troubleshooting (/admin/prayer-times) — Section 8: Prayer Times Management
SEC-08A · Section 8: Prayer Times Management ✓ Fully Implemented

Mosque Prayer Time Zone Configuration & Daily/Monthly Display (/mosque-admin/prayer & /prayer-times)

How to select a mosque’s official JAKIM prayer time zone, trigger schedule synchronization, view daily and monthly prayer times, and distinguish external JAKIM e-Solat data from manual configuration.

Purpose of Function Ensure every registered mosque displays authoritative JAKIM e-Solat prayer times for its exact geographical zone.
Prerequisites Signed in as `mosque_admin` for `/mosque-admin/prayer`; `/prayer-times` is publicly accessible.
Required User Permissions Mosque Scope: mosque.manage (/mosque-admin/prayer) | Public Access (/prayer-times)

1. Selecting & Updating the Mosque Prayer Time Zone (/mosque-admin/prayer)

  1. Sign in as a Mosque Administrator and open /{lang}/mosque-admin/prayer.
  2. Review the suggested official JAKIM zone for your mosque’s State and District.
  3. Select the appropriate zone in the Official Prayer Zone dropdown (prayer_zone_id). The server validates that the selected zone belongs to the mosque’s state.
  4. Click Save. The system updates mosques.prayer_zone_id and immediately synchronizes today’s and the current month’s schedules from JAKIM e-Solat.

2. Displaying Daily & Monthly Prayer Times (/prayer-times & Microsite)

  • Seven Daily Times: Displays Imsak, Subuh, Syuruk, Zohor, Asar, Maghrib, and Isyak along with Gregorian and Hijri dates.
  • Live Next-Prayer Highlight & Countdown: public/assets/js/prayer.js highlights the upcoming prayer card and runs a live countdown timer in Asia/Kuala_Lumpur time.
  • Monthly Schedule Table: Both /prayer-times and /mosque-admin/prayer display the full calendar month table.

3. External JAKIM e-Solat Data vs. Manual Configuration

Important Distinction: All prayer timestamps (Imsak through Isyak) and Hijri dates are retrieved exclusively from the official external JAKIM e-Solat API (https://www.e-solat.gov.my/). Mosque and platform administrators only configure the Official Zone Assignment (prayer_zone_id); manual entry or manual overriding of individual prayer times is intentionally prohibited.

Mosque Prayer Zone Configuration (/mosque-admin/prayer) and Daily/Monthly Prayer Schedule (/prayer-times).
Mosque Prayer Zone Configuration (/mosque-admin/prayer) and Daily/Monthly Prayer Schedule (/prayer-times).

Input Fields & Options Reference

Field / ActionScreenDescription
prayer_zone_id/mosque-admin/prayer, /mosque-admin/profileVerified JAKIM zone matching the mosque’s state.
action=sync/mosque-admin/prayerTriggers an immediate daily and monthly sync for the mosque’s assigned zone.
Expected Results: The mosque’s prayer zone is saved and official daily/monthly prayer times are rendered on the microsite and `/prayer-times`.
Important Notes & Data Boundaries: Every prayer sync operation records its status and HTTP code in `prayer_sync_logs`.

Common Errors & Troubleshooting

If saving a zone fails with a state mismatch error, ensure the mosque’s State in /mosque-admin/profile matches the state of the chosen JAKIM zone.

SEC-08B · Section 8: Prayer Times Management ✓ Fully Implemented

Automatic Prayer Time Sync, JAKIM e-Solat Source & Troubleshooting (/admin/prayer-times)

Technical and operational guide to automatic prayer time synchronization, the /admin/prayer-times administration console, CLI prayer-sync command, and troubleshooting missing times or API failures.

Purpose of Function Help Platform and Mosque Administrators keep prayer schedules up to date and diagnose synchronization or network errors.
Prerequisites Global `mosques.manage` permission for `/admin/prayer-times` or server CLI access for `php database/manage.php prayer-sync`.
Required User Permissions Global Scope: mosques.manage (/admin/prayer-times) or CLI prayer-sync

1. Official Prayer Time Source (JAKIM e-Solat)

Kariahku.com retrieves prayer times exclusively from the official JAKIM e-Solat endpoint:

  • Endpoint: https://www.e-solat.gov.my/index.php?r=esolatApi/takwimsolat&period={today|month}&zone={CODE}
  • Security & Validation: Enforces TLS certificate verification (`CURLOPT_SSL_VERIFYPEER = true`), a 12-second timeout, and strict `HH:MM` timestamp validation for all 7 prayer times before writing to `prayer_times`.

2. Automatic Updates & Admin Sync Controls (/admin/prayer-times)

  1. Automatic On-Demand Sync: Whenever a visitor opens `/prayer-times` or a mosque microsite and today’s schedule for that zone is not yet cached in `prayer_times`, `prayer_day_schedule()` automatically fetches today’s and the current month’s schedule from JAKIM e-Solat.
  2. Platform Admin Console (/admin/prayer-times):
    • Open /{lang}/admin/prayer-times.
    • Click Sync All Active Zones to refresh all 60 verified JAKIM zones, or select an individual zone and click Sync Zone.
  3. Scheduled CLI Command (Cron / Task Scheduler):
    php database/manage.php prayer-sync

3. Troubleshooting Missing Prayer Times & API Failures

  • Case 1 — Mosque Has No Zone Assigned: The microsite displays a configuration notice. Remedy: Assign an official zone in /mosque-admin/prayer.
  • Case 2 — Temporary JAKIM e-Solat Outage: If live synchronization fails, `prayer_day_schedule()` falls back to the most recent cached schedule for that zone in `prayer_times` and displays an explicit Stale Schedule Warning indicating the cached date.
  • Case 3 — Inspecting Sync Failures: Open /admin/prayer-times and review the Recent Synchronization Logs table (`prayer_sync_logs`) to check the `http_code` and `error_message`.
Platform JAKIM e-Solat Prayer Time Synchronization Console & Sync Logs (/admin/prayer-times).
Platform JAKIM e-Solat Prayer Time Synchronization Console & Sync Logs (/admin/prayer-times).

Input Fields & Options Reference

prayer_sync_logs ColumnDescription
period_typeSync scope: today, month, or catalogue.
statussuccess or failed.
records_writtenNumber of daily rows inserted/updated in prayer_times.
http_code & error_messageHTTP status code returned by e-Solat and diagnostic error message.
Expected Results: Prayer schedules across all 60 official JAKIM zones remain synchronized and resilient against temporary upstream outages.
Important Notes & Data Boundaries: The 60 official JAKIM prayer zones are seeded via `database/seeds/006_prayer_zones.php`.

Common Errors & Troubleshooting

If CLI or web sync fails with a cURL SSL certificate error on Windows/XAMPP, verify that curl.cainfo in php.ini points to a valid cacert.pem bundle and that outbound HTTPS to www.e-solat.gov.my is permitted.