mealie-recipes / mealie

Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor
https://docs.mealie.io
GNU Affero General Public License v3.0
6.76k stars 695 forks source link

API Time Zone is different to Mealie Time Zone set in ENV, posting wrong meal of the day on API request. #4263

Open mopedy opened 6 days ago

mopedy commented 6 days ago

First Check

What is the issue you are experiencing?

Setting the TZ in the docker env to Australia/Adelaide does not change the timezone for API requests. This causes the Meal of the day request via API rest request to change @UTC time instead of the set Timezone.

Steps to Reproduce

Meal Plan image

Homeassistant Rest Sensor image

Docker Container Time image

Please provide relevant logs

_mealie_logs (3).txt

Mealie Version

Details Version: v1.12.0 Build: 0d06494bbfc62fc8a1771a85fd308190891d6167 Application Mode: Production Demo Status: Not Demo API Port: 9000 API Docs: Enabled Database Type: sqlite Recipe Scraper Version: 15.0.0

Checks Secure Site: No Server Side Base URL: Yes LDAP Ready: No OIDC Ready: No OpenAI Ready: No Email Configured: No

docker.io/ghcr.io/mealie-recipes/mealie:v1.12.0

Deployment

Docker (Synology)

Additional Deployment Details

No response

boc-the-git commented 6 days ago

How is the HA sensor being created?

mopedy commented 5 days ago

I create it as sensor entity in config. image

Not sure if it helps but it has the correct meal in the calender in HA, just the picture in camera entity that is created with the generic camera does not match until 09:30am

image

http://192.168.1.116:9925/api/media/recipes/{{states('sensor.mealie_todays_meal_id')}}/images/min-original.webp

It seems Mealie integration and Mealie use the set TZ of ACST which is UTC +9:30 but the API uses UTC.

Thanks for looking into this.