Evolution of entanglement entropy in one-dimensional systems