Vehicle fires may lead to on-board high-pressure composite cylinders experiencing a term of localized and engulfing fire. During this period, the composite cylinder would be degraded and even burst before pressure relief device (PRD) could be activated to release internal high-pressure gas. In this paper, experimental investigation for such cylinders subjected to localized and engulfing fire was conducted on an aluminum liner composite cylinder filled with hydrogen. A three-dimensional computational fluid dynamics (CFD) model is developed to study the key factors influencing PRD activation time. The effects of hydrogen and compressed natural gas (CNG) as filling media, cylinder pressure and localized fire exposure time are analyzed in detail. The experimental results showed that pressure and temperature of internal gas rose very slowly during the localized fire. In addition, Hydrogen and CNG as filling media with different pressures have weak influence on the activation time of thermally activated PRD (TPRD), but have significant effect on the activation time of pressure-activated PRD (PPRD). TPRD can respond more quickly to protect the hydrogen composite cylinder than PPRD. PRD activation time increases as the localized fire exposure time is extended.