fixed date conversion bug introduced in last commit