{"slug":"us-stock-market-hours-uae-time","qid":"gst_session_clock","label":"gst_session_clock","post_title":"us-stock-market-hours-uae-time","post_url":"/blog/us-stock-market-hours-uae-time#q-gst_session_clock","columns":["session_label","offset_hours","gst_premarket_open","gst_regular_open","gst_early_close","gst_regular_close","gst_after_hours_end"],"rows":[{"session_label":"Mon Oct 27, 2025","offset_hours":8,"gst_premarket_open":"12:00","gst_regular_open":"17:30","gst_early_close":"21:00","gst_regular_close":"00:00","gst_after_hours_end":"04:00"},{"session_label":"Tue Oct 28, 2025","offset_hours":8,"gst_premarket_open":"12:00","gst_regular_open":"17:30","gst_early_close":"21:00","gst_regular_close":"00:00","gst_after_hours_end":"04:00"},{"session_label":"Wed Oct 29, 2025","offset_hours":8,"gst_premarket_open":"12:00","gst_regular_open":"17:30","gst_early_close":"21:00","gst_regular_close":"00:00","gst_after_hours_end":"04:00"},{"session_label":"Thu Oct 30, 2025","offset_hours":8,"gst_premarket_open":"12:00","gst_regular_open":"17:30","gst_early_close":"21:00","gst_regular_close":"00:00","gst_after_hours_end":"04:00"},{"session_label":"Fri Oct 31, 2025","offset_hours":8,"gst_premarket_open":"12:00","gst_regular_open":"17:30","gst_early_close":"21:00","gst_regular_close":"00:00","gst_after_hours_end":"04:00"},{"session_label":"Mon Nov 3, 2025","offset_hours":9,"gst_premarket_open":"13:00","gst_regular_open":"18:30","gst_early_close":"22:00","gst_regular_close":"01:00","gst_after_hours_end":"05:00"},{"session_label":"Tue Nov 4, 2025","offset_hours":9,"gst_premarket_open":"13:00","gst_regular_open":"18:30","gst_early_close":"22:00","gst_regular_close":"01:00","gst_after_hours_end":"05:00"},{"session_label":"Wed Nov 5, 2025","offset_hours":9,"gst_premarket_open":"13:00","gst_regular_open":"18:30","gst_early_close":"22:00","gst_regular_close":"01:00","gst_after_hours_end":"05:00"},{"session_label":"Thu Nov 6, 2025","offset_hours":9,"gst_premarket_open":"13:00","gst_regular_open":"18:30","gst_early_close":"22:00","gst_regular_close":"01:00","gst_after_hours_end":"05:00"},{"session_label":"Fri Nov 7, 2025","offset_hours":9,"gst_premarket_open":"13:00","gst_regular_open":"18:30","gst_early_close":"22:00","gst_regular_close":"01:00","gst_after_hours_end":"05:00"}],"shape":"table","sql":"WITH bars AS\n(\n    SELECT\n        toDate(toTimeZone(window_start, 'America/New_York')) AS et_date,\n        toTimeZone(window_start, 'America/New_York')         AS et_ts,\n        toTimeZone(window_start, 'Asia/Dubai')               AS gst_ts,\n        toHour(et_ts) * 60 + toMinute(et_ts)                 AS et_minute,\n        toHour(gst_ts) * 60 + toMinute(gst_ts)               AS gst_minute\n    FROM global_markets.delayed_stocks_minute_aggs\n    WHERE ticker = 'SPY'\n      AND window_start >= toDateTime('2025-10-27 04:00:00', 'UTC')\n      AND window_start <  toDateTime('2025-11-08 06:00:00', 'UTC')\n),\noffsets AS\n(\n    SELECT\n        et_date,\n        anyIf(gst_minute - et_minute, et_minute = 570) AS gst_offset_minutes\n    FROM bars\n    GROUP BY et_date\n    HAVING countIf(et_minute = 570) > 0\n)\nSELECT\n    concat(formatDateTime(et_date, '%a %b '), toString(toDayOfMonth(et_date)), ', ', toString(toYear(et_date))) AS session_label,\n    toUInt8(intDiv(gst_offset_minutes, 60))                                                       AS offset_hours,\n    formatDateTime(toDateTime(toUInt32((240  + gst_offset_minutes) % 1440) * 60, 'UTC'), '%H:%i') AS gst_premarket_open,\n    formatDateTime(toDateTime(toUInt32((570  + gst_offset_minutes) % 1440) * 60, 'UTC'), '%H:%i') AS gst_regular_open,\n    formatDateTime(toDateTime(toUInt32((780  + gst_offset_minutes) % 1440) * 60, 'UTC'), '%H:%i') AS gst_early_close,\n    formatDateTime(toDateTime(toUInt32((960  + gst_offset_minutes) % 1440) * 60, 'UTC'), '%H:%i') AS gst_regular_close,\n    formatDateTime(toDateTime(toUInt32((1200 + gst_offset_minutes) % 1440) * 60, 'UTC'), '%H:%i') AS gst_after_hours_end\nFROM offsets\nORDER BY et_date","computed_at":"2026-09-29T14:51:50.311635+00:00","elapsed":0.053381433}