Skip to content

Dynamic Menu Not Returning Items Based on Current Time #12

@pratikj697

Description

@pratikj697

An issue occurs with the /api/menu endpoint of the Restaurant Management System. The goal of this endpoint is to retrieve the current menu items based on the available hours specified in the database. However, it seems that the endpoint is not returning the expected results based on the current time.

Environment:

  1. Application: Restaurant Management System
  2. Framework: Flask (Python)
  3. Database: MySQL
  4. Port: 3000
  5. Current Time: (Include the actual current time when testing)

Expected Result:
The API should return a list of menu items that are available during the current hour.

Actual Result:
The API response returns an empty list or does not return any items even though there are items in the database that should be available.

Potential Issues to Investigate:

  1. Database Values: Check if the available_time_start and available_time_end values for the menu items in the database are correctly set and fall within the range of 0 to 23 (representing hours).
  2. Time Zone: Ensure that the server's timezone matches the timezone in which the menu times are set, as a mismatch could lead to incorrect current hour calculations.
  3. Debugging Output: Consider adding debug print statements or logging the current hour and the query results to gain insight into the execution flow.

Please let me know if you need any further information or clarification. I would appreciate any insights on why this issue might be occurring and how it can be resolved and please assign this problem to me under HacktoberFest 2024 @Ayu-hack .

Metadata

Metadata

Assignees

Labels

hacktoberfest-acceptedMarks a PR as valid under Hacktoberfest, counting towards participant contributions.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions