Move timezone logic out of server.php

@DeepDiver1975 @Raydiation @LukasReschke 

Fix #12874 
Ok great :) will include it in my intelligent container PR