Added a default Timezone to make DateTime work on systems without date.timezone ini option
Added initgpty to the check and sanitize function