Echo and $timestamp should have nothing at all to do with server time. $msgstamp refers to server time.