Two weeks seems excessive. But, on a closed border, you should know better than to just walk across a closed border and not get into trouble.
That said, this actually happened to a running friend of mine 3 years ago. They were running Northwest Passage Ragnar and their GPS took them across the border (I am actually shocked this is possible). Same thing-- the border patrol showed up. Well, the friend is someone who came here (from Africa) on a student visa in 2008 and just stayed. The border guards reminded him he was out of status and they began deportation proceedings. Somehow (I have no idea how) he managed to convince them to let him stay. So, now he has permanent status. Which is kind of crazy. But, yeah, don't piss off the border patrol.
Now-- why we don't have open EU style borders is beyond me.
In germany last year we drove into austria and back into germany and there was no border or any other craziness.