{"product_id":"convert-utc-to-mena-local-time-in-n8n-ramadan-send-rules","title":"Convert UTC to MENA Local Time in n8n (Ramadan Send Rules)","description":"\u003ch3\u003eConvert UTC to MENA local time—then apply Ramadan-aware sending rules in n8n\u003c\/h3\u003e\n\u003cp\u003eThis n8n sub-workflow converts a UTC timestamp into MENA local time (based on your IANA time zone), computes workweek\/weekend status, derives Umm al-Qura Hijri dates, and decides whether a message is \u003cem\u003esendable\u003c\/em\u003e—including Ramadan late-night and Friday-prayer blocking—returning a clear contract for downstream automation.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAccepts inputs\u003c\/strong\u003e from a parent workflow (or a manual self-test): \u003ccode\u003ets_utc\u003c\/code\u003e, \u003ccode\u003etz\u003c\/code\u003e (IANA), \u003ccode\u003ecountry\u003c\/code\u003e, and \u003ccode\u003eaudience\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eApplies defaults\u003c\/strong\u003e when values are missing (e.g., Baghdad time zone, Iraq country code, and a current UTC timestamp).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eConverts time and computes context\u003c\/strong\u003e: converts UTC to the target time zone, calculates the UTC offset, determines the local weekday, and flags \u003cstrong\u003eworkdays vs weekends\u003c\/strong\u003e using a per-country weekend table.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSupports scheduling rollups\u003c\/strong\u003e: computes local day boundaries in UTC and calculates the next workday start time for scheduling.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDerives Hijri + Ramadan flags\u003c\/strong\u003e: derives Umm al-Qura Hijri date and flags \u003cstrong\u003eRamadan\u003c\/strong\u003e, \u003cstrong\u003eEid al-Fitr\u003c\/strong\u003e, \u003cstrong\u003eEid al-Adha\u003c\/strong\u003e, and the \u003cstrong\u003eHajj window\u003c\/strong\u003e, including any user-provided holiday overrides.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEvaluates sendability windows\u003c\/strong\u003e: classifies local time into a daypart and checks whether the timestamp is inside an allowed send window (with Friday prayer blocking and Ramadan late-night rules).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOutputs a dependable contract\u003c\/strong\u003e: returns \u003ccode\u003eis_sendable\u003c\/code\u003e, \u003ccode\u003eblock_reason\u003c\/code\u003e, and—when blocked—\u003ccode\u003esend_after\u003c\/code\u003e. You can also run a self-test report with pass\/fail assertions.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eScheduling campaigns across MENA countries with accurate local time and weekend rules.\u003c\/li\u003e\n  \u003cli\u003ePreventing outbound messages during blocked periods (e.g., Friday prayer and Ramadan late-night).\u003c\/li\u003e\n  \u003cli\u003eBuilding reliable “send later” logic that schedules at the next allowed workday start.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNodes\/logic used\u003c\/strong\u003e: if, set, code, sticky note, manual trigger, execute workflow trigger.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45767896957107,"sku":"N8N-17880","price":58.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/b313kH9aFCjNFT-JVmuUT_wgIGEkZ4.png?v=1786093543","url":"https:\/\/buyflowscripts.com\/products\/convert-utc-to-mena-local-time-in-n8n-ramadan-send-rules","provider":"N8N Commerce","version":"1.0","type":"link"}