This is actually still done in many large cities with time-of-day electricity prices. The cooling is done using typical cooling equipment, but instead of directly cooling the air in the building during the day, ice is built up thoughout the night when electricity is cheap and the outdoor air is cool. During the day, the air in the building is cooled with melting ice and the normal refrigeration equipment is used as a daytime backup only.