Moved back to built in date calc instead of unix calls, test fix (doesn't work)