The episode is set in 1959, when divorce law in England and Wales required either one of the estranged couple to provide evidence in law of a 'fault' such as adultery. Contrived setups to enable a third party to witness an act of adultery, as described in the episode, were commonplace until the passing of the Divorce Law Reform Act 1969, which allowed for divorce on the grounds of 'irretrieveable breakdown' of the marriage without having to prove either party being at fault.
This episode takes place in 1959.