check: Fix datetime unit test for builds without assert
If built with assertions disabled, we need to ensure the variable is properly reset before testing
If built with assertions disabled, we need to ensure the variable is properly reset before testing