Move timezone logic out of server.php

@DeepDiver1975 @Raydiation @LukasReschke 

Fix #12874 
PHPDoc please