Well, in the U.S......
Trying to remember the exact wording....but, essentially, if the F/O is 'appropriately rated' (in the case of an aircraft requiring a type rating, he is type rated in that aircraft)....and in the case of airline operations, where an ATP is required to be in command (The F/O has an ATP with the type rating.).......and, he is the 'sole manipulator of the controls'.....then, in the U.S. he can, in fact, log the time as "Pilot-in-Command" when he is the flying pilot.
I'm totally ignorant with regard to the regulations in other parts of the world, but in the U.S., this is the case.
Fly safe,
PantLoad