A measurement of the time-dependent CP-violating asymmetry in Bs0→ϕϕ decays is presented. Using a sample of proton-proton collision data corresponding to an integrated luminosity of 5.0 fb−1 collected by the LHCb experiment at centre-of-mass energies s = 7 TeV in 2011, 8 TeV in 2012 and 13 TeV in 2015 and 2016, a signal yield of around 9000 Bs0→ϕϕ decays is obtained. The CP-violating phase ϕsss¯s is measured to be −0.073 ± 0.115(stat) ± 0.027(syst) rad, under the assumption it is independent of the helicity of the ϕϕ decay. In addition, the CP-violating phases of the transverse polarisations under the assumption of CP conservation of the longitudinal phase are measured. The helicity-independent direct CP-violation parameter is also measured, and is found to be |λ| = 0.99 ± 0.05(stat) ± 0.01(syst). In addition, T-odd triple-product asymmetries are measured. The results obtained are consistent with the hypothesis of CP conservation in b¯ → s¯ ss¯ s transitions. Finally, a limit on the branching fraction of the B0 → ϕϕ decay is determined to be B(B→ ϕϕ) < 2.7 × 10 − 8 at 90 % confidence level. [Figure not available: see fulltext.].