Most urban solar PV systems are grid-tied, which means they are safely connected to the normal utility grid. When the sun is out and there is excess solar production, the electricity is exported to the grid and the facility is credited by the utility provider. At night or when cloudy, the electricity is bought back from the grid.