Fixing some variables and PHP timezone issues.