where  is the total entropy change in the external thermal reservoirs (surroundings),  is an infinitesimal amount of heat that is taken from the reservoirs and absorbed by the system ( if heat from the reservoirs is absorbed by the system, and  < 0 if heat is leaving from the system to the reservoirs) and  is the common temperature of the reservoirs at a particular instant in time.
The total entropy change in the external thermal reservoirs (surroundings) is an infinitesimal amount of heat that is taken from the reservoirs and absorbed by the system. If heat flows from the system to the reservoirs, then the entropy change is negative.