Credentials: B737 & B767 B1 Certifier.
There seems to be quite a lot of confusion over the operation of the Cockpit Door Locking System.
The A319/A320/A321 FCOM is available for download from Smart Cockpit here:
A319 320 321 Equipment
Go to page 34 of the document. It gives a good overview of the operation and restrictions. Where it quotes ‘From’ and ‘To’ times, this is company-specific programmable.