How is the duration of the 144-hour visa-free transit calculated?
english.shanghai.gov.cn
A: The border inspection station will issue you a temporary entry permit, and the visa-free transit is calculated from 12am of the next day upon arrival. You can stay within the administrative areas of Shanghai, Jiangsu and Zhejiang without a visa for up to 144 hours.
Source: Shanghai Exit-Entry Border Inspection General Station