Is that when he gets the confession dial? In which case are we seeing events in order this year? There was also that "longest month of my life" reply in the Zygon episode. Is there some funky timey wimey stuff going on here?
I don't think it is that complicated.
Mayor Me is hired to catch the Doctor for someone. At that time, he hands over his confession dial to Mayor Me as well. He gets the dial back after his ordeal. We don't need time to be terribly bent for this to be consistent.
The Doctor mentions that the equipment he sees in the castle is consistent with a heavy-duty, long range teleporter, which could take him up to one light year from his place of origin, which was on Earth. That probably doesn't get him to Gallifrey. I'm guessing instead of teleporting any major distance, he was *put into the dial*, which Mayor Me then handed over (presumably now, ultimately to the Time Lords). The Doctor uses the dial's own internal logic against it, and breaks free rather than give his confession, and he picks it up after he exits it.
The amount of subjective time he spent in there was very, very long, but the whole episode notes how he can sometimes enter periods of extreme mental activity, where time to him passes very slowly while he thinks. So, maybe he's been in there a billion years, or maybe his whole experience in the dial was in that extreme state, so much less external time passed.
We shall see. If he gets his TARDIS back, exactly how long it took will be moot, really.
