Time reversibility in nonequilibrium thermomechanics