Exercise tracker, 4th user story

I’ve solved this problem, but the lack of specificity on this problem and the choice of the date format was difficult to navigate to a solution. So I’m posting this for others that may come along encountering the same problem.

Situation: This story test will often fail cryptically if the Server’s local time is behind UTC.

Background: The problem expects dates to be reported in the Date.prototype.toDateString() format, which converts the timedate in the object, to the calling system’s local time offset.

Assessment: This test would fail cryptically through the remote portal (even failing if using the gleam example provided).

Recommendations for the problem:

  1. clarify the return format with an example
  2. If using the date format of Date.prototype.toDateString() warn of the implicit time offset conversion that may happen.

Recomendations for students encountering the same problem:
Print the request body parameters to console to see the incoming request, print the response json to console to see the output being sent back and compare them to make sure the dates still match.
If noticing a mismatch, adjust the date object’s time by your local time offset to make it UTC when printed by toDateString