Move timezone logic out of server.php

@DeepDiver1975 @Raydiation @LukasReschke 

Fix #12874 
No, it was added 1 or 2 weeks ago