Back-end development using Node JS-->Node Fundamentals & Server-->HTTP Servers-->Greeting Server

I attempted the challenge requiring a server that returns a greeting based on the current time (Good morning!, Good afternoon!, or Good evening!). The provided solution code and my own corrected implementation both fail the test:

Steps Taken

  1. Implemented the server using Node’s http module.
  2. Used the following greeting function (without any hardcoded offset):
function getGreeting() {
    const now = new Date();
    const hour = now.getHours();

    if (hour < 12) return "Good morning!";
    if (hour < 18) return "Good afternoon!";
    return "Good evening!";
}
  1. Tested locally — the greeting changes correctly according to system time.
  2. Replaced my code with the exact provided solution.
  3. The test still fails with the same error.

Expected Result
The test should pass if the greeting matches the current system time.

Actual Result
The test fails, even with the official solution code.