In the early 2010s, I recall reading a trilogy of novels about 2 kids who have to keep earth's timeline from changing. In order to do this, they stayed on a loop of one day in a city (I think San Fransisco?) and if their surroundings changed in any small way, they'd know something happened in the past and messed with the timeline.
They also had some sort of bodyguard clone thing that was a man in the first book, was somehow made into a woman in the second, and both versions joined them in the last.
The only specifics I can remember about each book is that the first involves the First World War, the second involves dinosaurs. I have a vague recollection of Prince John in the third book, but nothing beyond that.
I was young when I read it, so I assume it's not very highbrow literature, just a YA fiction series or something like that.
Anyone remember this series?