Changed date system to use python datetime module