It depends on whether that person is referring to an instance or a general truth.
If it's a general and fixed truth, present tense is retained, since the statement applies to the present as well as the past in which it was stated. Therefore, there is no reason to deviate from the default tense, i.e. present tense.
If it's a temporary instance, then the tense is changed to reflect the same tense of "to say", since the statement and the observation contained in that statement happened at the same point in time (because at the time of stating it, present tense was being used to indicate the present time).
John: The sun rises in the east.
Let's for the moment live in a universe where every day the sun rises from a random location. That would mean that John's statement is referring to today specifically, not necessarily tomorrow.
That makes in an instance, and therefore John said that the sun rose in the east.
But that's not our universe. In our universe, the sun always rises in the east. John's telling us a fixed truth. Therefore, John said that the sun rises in the east.
John: She is beautiful
Is John stating that this person is, always has been, and always will be beautiful? Then John said that she is beautiful.
But if John was making a comment about how she looks right now, e.g. because she dressed up for the occasion, then John said she was beautiful (although it would be more idiomatic to say that she looked beautiful).
3 - slightly adapted
John: I don't understand computers.
If John is commenting on his knowledge today, but acknowledges that he either will learn in the future or did know more in the past, then John said that he didn't understand computers.
If John is commenting that computers are a topic that he will never understand, then John said that he doesn't understand computers.
That being said, people sometimes bend the rules either because they use something that sounds more natural to them, or because they're trying to avoid an impolite implication.
For example, "John said she was beautiful" would be correct if John was talking about a particular instance in which he states "She is beautiful", but it can also be interpreted as John having literally said "She was beautiful", which would mean that John implied she's no longer beautiful.
Politeness urges you to avoid phrasings that could be interpreted in a hurtful way, so people are inclined to avoid using "John said she was beautiful" in order to avoid that alternate interpretation.