For general interest, here is the origin story of TSP, which RW is quoted telling for The Independent 23 Aug 2018 article (previously linked), which, as far as I can find was one of her earliest interviews.
She says, “It was about two years after we finished walking that I decided to write down what we had done, and I really did it for Moth. I presented him with about 40 pages for his birthday [this must have been his 56th, in July 2016], and then our kids wanted to read it, and everybody was like, this isn’t bad, you know.”
Winn’s childhood ambitions to write had melted away as “life got in the way”, but she decided to try to boil down the experiences into an article, which she placed with The Big Issue. It was a good fit for her; their experiences with people’s reaction to their homelessness fed into the ethos of The Big Issue, which benefits the homeless through its sales model.
The piece was published in the summer of 2017, and the reaction to it was so positive that it re-ignited Winn’s literary ambitions. She contacted an agent one Friday and was signed up with them a week later. Then she got a book deal… with, of course, an imprint of Penguin.
So in this version we go from 40 pages in July 2016, to an article in July 2017, to getting signed thereafter, and published in 2018.
There's no mention of when the actual book was written! Instead life got in the way?! Nevertheless, we know from RW's email to the Big Issue in May 2017 that she had in fact written the book titled Lightly Salted Blackberries by then. So it looks like she wrote it between July 2016 & May 2017. And over the years she's distorted the story into having written the entire book as a gift for Moth, because she can't help herself. Mistakes were made.