In Germany that's forbidden, you'd have to pay them.
But you can be placed in a room/office with no windows (not the OS), a computer without internet access and nothing to do. How long can you go on like that?
The law, sadly, can't forbid asshole employers.