Will Durant said this quote

Moral codes adjust themselves to environmental conditions.