The main clause sets the tense
A que-clause after dire, penser, croire, savoir, espérer, promettre has no timeline of its own. If the main clause is in the present, you choose the tense by meaning. If it is in the past, the subordinate clause moves one step back.
The three shifts
| In the subordinate clause | Main clause in the present | Main clause in the past |
|---|---|---|
| simultaneous | Présent | Imparfait |
| earlier | Passé composé | Plus-que-parfait |
| later | Futur simple | Conditionnel présent |
English backshifts the same way (he says he is ill becomes he said he was ill), so trust your instinct. In casual English the present often stays (he said he is coming); French shifts by default: Il a dit qu'il était malade.
The same content, two main clauses
Je sais qu'elle travaille beaucoup.
I know she works a lot.
Je savais qu'elle travaillait beaucoup.
I knew she worked a lot.
Je sais qu'elle a réussi son examen.
I know she has passed her exam.
J'ai appris qu'elle avait réussi son examen.
I heard she had passed her exam.
The future of back then
What was still ahead from a past viewpoint goes into the conditionnel présent. It is not a condition here, just "the future seen from back then". English would is exactly this: He said he would come is Il a dit qu'il viendrait.
Future seen from the past
On m'a promis que le colis arriverait lundi.
I was promised the parcel would arrive on Monday.
Je pensais que tu serais en retard.
I thought you would be late.
Elle espérait qu'on lui répondrait vite.
She hoped they would answer her quickly.
When the tense stays put
If the subordinate clause is still true, the present may stay, for instance with general truths and ongoing situations. Shifting is just as correct: Elle m'a dit qu'elle habitait à Nantes works equally well.
Still valid beyond that moment
Le professeur a expliqué que la Terre tourne autour du Soleil.
The teacher explained that the Earth goes round the Sun.
Elle m'a dit qu'elle habite à Nantes – elle y habite toujours.
She told me she lives in Nantes – she still lives there.