Move timezone logic out of server.php

@DeepDiver1975 @Raydiation @LukasReschke 

Fix #12874 
How recent is this method? I mean is it already present in oc7 and are we breaking compability?