correcting timetuples bug