APIs and Microservices Projects - Timestamp Microservice issue

I am trying to solve the challenge APIs and Microservices Projects - Timestamp Microservice but when doing the tests 2 of them I can not pass them, the tests are

  • It should handle an empty date parameter, and return the current time in unix format
  • It should handle an empty date parameter, and return the current time in UTC format

I manage to pass all the others just those 2 are the ones I can’t pass this is the league of my code

Hello Rajiravi,

You need to check whether or not date_string is empty, probably before you check whether its a unix time or a date string.