query(“SELECT * FROM rvyrlozumpt_extra”);
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
// Calculer l’heure d’été -4 H ou d’hivers -5H
$utc_date = DateTime::createFromFormat(
‘Y-m-d G:i’,
date(‘Y-m-d H:i’),
new DateTimeZone(‘UTC’)
);
$dateJour = $utc_date;
$userTimezone = new DateTimeZone(‘America/New_York’);
$dateJour->setTimeZone($userTimezone);
$gmtTimezone = new DateTimeZone(‘GMT’);
$myDateTime = new DateTime(date(‘Y-m-d H:i’), $gmtTimezone);
$offset = $userTimezone->getOffset($myDateTime)/3600;
?>
getPrayerTimes($date, $latitude, $longitude, $offset);
if(date(‘d’,$date) == Date(‘d’) && date(‘m’,$date) == Date(‘m’)){
$athanFajr = $times[0];
$shorouq = $times[1];
$athanDhohr = $times[2];
$athanAsr = $times[3];
$athanMaghrib = $times[5];
$athanIshae = $times[6];
// Si Al-Iqama se fait après quelques minutes on fait le calcul sinon on affiche l’heure fix
//Iqama d’Al-Fajr
if(strlen($row[“IqamaFajr”]) <= 2){
$IqamaFajr = date("h:i", strtotime("+$row[IqamaFajr] minute", strtotime($athanFajr)));
}else{
$IqamaFajr = $row[IqamaFajr];
}
//Iqama de Dohr
if(strlen($row["IqamaDohr"]) <= 2){
$IqamaDhohr = date("G:i", strtotime("+$row[IqamaDohr] minute", strtotime($athanDohr)));
}else{
$IqamaDhohr = $row["IqamaDohr"];
}
//Iqama de Asr
if(strlen($row["IqamaAsr"]) <= 2){
$IqamaAsr = date("G:i", strtotime("+$row[IqamaAsr] minute", strtotime($athanAsr)));
}else{
$IqamaAsr = $row["IqamaAsr"];
}
//Iqama de Maghrib
if(strlen($row["IqamaMaghrib"]) <= 2){
$IqamaMaghrib = date("G:i", strtotime("+$row[IqamaMaghrib] minute", strtotime($athanMaghrib)));
}else{
$IqamaMaghrib = $row["IqamaMaghrib"];
}
//Iqama de Ishae
if(strlen($row["IqamaIsha"]) <= 2){
$IqamaIshae = date("G:i", strtotime("+$row[IqamaIsha] minute", strtotime($athanIshae)));
}else{
$IqamaIshae = $row["IqamaIsha"];
}
$Sermon1_Ven = $row["Sermon1_Ven"];
}
$date += 24* 60* 60; // next day
}
?>