It's not quite as simple as that.
There is no blanket peak or off peak time restriction, restrictions are determined by the actual ticket for the journey you're making.
While we don't know the exact journey being made by the OP I'm sure it'll be one on which an off peak ticket was valid,never if it was at 5pm.
There are many journeys you can still make in the evening 'peak' using off peak tickets, despite what Northern claim.
I suspect that the CDR was valid. A sample journey such as Wakefield to Barnsley does not carry the restriction.
Northern are hopeless at this. I was on a train home recently from Manchester, in the "evening peak", and the Guard was busy going down checking tickets after Rochdale telling everyone going into West Yorkshire that Off Peak tickets weren't valid, but he "would let them off this time". They were, no restrictions apply for those journeys.
A friend of mine rung me the other week and tells me that when buying a ticket from a Northern station in West Yorkshire to Manchester, which does not carry the evening peak restriction, he had particular issues in this regard at the station, on the train, and at the barrier.
I thought that only applied if the fare setter was a PTE? We would need to know exactly what ticket johntea bought in order to comment on who is correct here.
No. Technically the PTEs don't set any point to point fares now at all, despite what things such as BRFares say. Northern is the fare setter in full. PTEs only set things such as DayRovers, Mcards etc. Obviously point to point fares within PTE boundaries are artifically deflated due to the existence of the Rovers, MCard type products. Much the same on buses. I am sure First, Transdev etc would want to charge higher bus fares in peaks, especially for their own All-Day tickets, but the existence of the Metroday in West Yorkshire keeps their fares lower than might be expected.
That aside, however, there are many fares where the restriction applies which are not wholly within PTE boundaries - Leeds - Skipton, Manchester - Warrington for example.