{"slug":"us-stock-market-hours-tehran-time","qid":"do_regime","label":"do_regime","post_title":"us-stock-market-hours-tehran-time","post_url":"/blog/lang/fa/us-stock-market-hours-tehran-time#q-do_regime","columns":["tehran_open","tehran_close","et_open","tehran_lead","session_count","first_session","last_session"],"rows":[{"tehran_open":"17:00","tehran_close":"23:30","et_open":"09:30","tehran_lead":7.5,"session_count":189,"first_session":"2025-09-02","last_session":"2026-10-02"},{"tehran_open":"18:00","tehran_close":"00:30","et_open":"09:30","tehran_lead":8.5,"session_count":83,"first_session":"2025-11-03","last_session":"2026-03-06"}],"shape":"series","sql":"SELECT\n    tehran_open,\n    tehran_close,\n    et_open,\n    tehran_lead,\n    session_count,\n    first_session,\n    last_session\nFROM\n(\n    SELECT\n        formatDateTime(toTimeZone(first_bar, 'Asia/Tehran'), '%H:%i')                                AS tehran_open,\n        formatDateTime(toTimeZone(last_bar + INTERVAL 1 MINUTE, 'Asia/Tehran'), '%H:%i')             AS tehran_close,\n        formatDateTime(toTimeZone(first_bar, 'America/New_York'), '%H:%i')                           AS et_open,\n        round((\n              (toHour(toTimeZone(first_bar, 'Asia/Tehran')) * 60\n             + toMinute(toTimeZone(first_bar, 'Asia/Tehran')))\n            - (toHour(toTimeZone(first_bar, 'America/New_York')) * 60\n             + toMinute(toTimeZone(first_bar, 'America/New_York')))\n        ) / 60, 1)                                                                                   AS tehran_lead,\n        count()                                                                                      AS session_count,\n        toString(min(session_date))                                                                  AS first_session,\n        toString(max(session_date))                                                                  AS last_session\n    FROM\n    (\n        SELECT\n            toDate(toTimeZone(window_start, 'America/New_York')) AS session_date,\n            min(window_start)                                    AS first_bar,\n            max(window_start)                                    AS last_bar\n        FROM global_markets.delayed_stocks_minute_aggs\n        WHERE ticker = 'SPY'\n          AND window_start >= today() - 400\n          AND window_start <  today() - 2\n          AND (toHour(toTimeZone(window_start, 'America/New_York')) * 60\n               + toMinute(toTimeZone(window_start, 'America/New_York'))) >= 570\n          AND (toHour(toTimeZone(window_start, 'America/New_York')) * 60\n               + toMinute(toTimeZone(window_start, 'America/New_York'))) < 960\n        GROUP BY session_date\n        HAVING countDistinct(window_start) = 390\n    )\n    GROUP BY tehran_open, tehran_close, et_open, tehran_lead\n)\nORDER BY tehran_lead","computed_at":"2026-10-05T15:20:37.520375+00:00","elapsed":0.409327359}