Residential Tenancies Act 1986, s 11
In that case the rules in the Act override the agreement – unless the difference is in your favour as the tenant.
For example, if the agreement says the landlord only has to give you one month’s notice to end the tenancy, instead of the 90 days required by the Act, then that clause in your agreement doesn’t have any legal effect – the landlord still has to give you 90 days’ notice, just the same as if it said 90 days in your agreement.
On the other hand, if your agreement says the landlord has to give you 120 days’ notice (four months), that does legally bind the landlord, because it’s better for you than the minimum 90-day period required by the Act.