The NYC income tax does not apply to non-residents: https://www.tax.ny.gov/pit/file/nonresident-faqs.htm#nonresi... (edit: linked to clearer section in the FAQ)
Since 2009 residents of NY who live in counties adjacent to NYC are subject to a 0.34% tax if they work in NYC. I believe this tax does not go toward general NYC operations, but rather helps fund the mass-transit that supports their commute. See: https://en.wikipedia.org/wiki/Commuter_tax