Unit tests for convertStringToWallTime, and refactored it