Modifed set order function and test case so that it gets the date itself, not passed as a parameter