On a freezing New Year’s Day, the democratic socialist mayor took his ceremonial oath of office on the steps of New York City Hall.