When recovery_target_time is set, but recovery finishes before it reaches that time, it outputs "before 2000-01-01 00:00:00+00" to the .history file. This is because it uses recoveryStopTime, which is initialised to 0, but is never set, and is then passed to timestamptz_to_str, which gives it this date output.
A similar problem exists for recovery_target_xid. When recovery finishes before reaching the specified xid, it outputs "before transaction 0" to the .history file, which is also confusing.
Could we produce something more meaningful? I've attached a patch which changes it to say 'recovery reached consistency before recovery target time of "<recovery_target_time>"' and 'recovery reached consistency before recovery target xid of "<recovery_target_xid>"'.
It may be the wrong way of going about it, but you get the idea of what I'm suggesting we output instead.