Dynamic Menu Not Returning Items Based on Current Time
Opened this issue · 2 comments
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:
- Application: Restaurant Management System
- Framework: Flask (Python)
- Database: MySQL
- Port: 3000
- 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:
- 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).
- 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.
- 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 .
Please some changes has been merged into the project. Check it and work accordingly.
Please share the screenshot of working in PR, to get it merged.
Assigned. More repos are available for pull requests, and they’re part of Hacktoberfest 2024.
Feel free to tag me in your Hacktoberfest certificate or badges LinkedIn post! 😄
👉 Follow my GitHub and connect with me on LinkedIn!
⭐ Star these repos to stay updated for next year’s Hacktoberfest!