Replaced Time.new with Time.local to avoid daylight saving inconsistencies