Changed python to use datetime class