Working str2time function with basic mocha tests