Skip to content

Datetime planner: server#685

Merged
TomBursch merged 24 commits intoTomBursch:mainfrom
crosspolar:datetime_planner_server
Mar 30, 2025
Merged

Datetime planner: server#685
TomBursch merged 24 commits intoTomBursch:mainfrom
crosspolar:datetime_planner_server

Conversation

@crosspolar
Copy link
Copy Markdown
Collaborator

@crosspolar crosspolar commented Mar 17, 2025

  • The backend part includes a new field for Planner (cooking_date) with type DateTime without timezone and discarded the day field. If the API receives day though from older apps, it will be transformed into cooking_date.
  • Before, missing values were modelled as -1. Now, at least in python, there is a datetime.min value which is 01st of January in the year 1.
  • All datetime-objects are dates only and hence without time currently. To make comparing to datetime.now() theoretically more easy, the time is always set to 23:59:59. In the future, time could be used to differ between breakfast, lunch, etc.

TODO

  • data migration (failed)
  • handle date-times in the past: For example a user picks tomorrow as planned date but doesn't cook the recipe for two days. To sync with the day-logic, old recipes could be reset to the future by adding +7 days.
  • squash commits

@TomBursch
Copy link
Copy Markdown
Owner

This looks really good already!

handle date-times in the past: For example a user picks tomorrow as planned date but doesn't cook the recipe for two days. To sync with the day-logic, old recipes could be reset to the future by adding +7 days.

I think we can just leave them in the past and show yesterday above them or the actual date if they're older.

Do you know why the data migration fails? It looks good to me. Maybe you need to split up the batch alter table into two (like here for example)

@crosspolar
Copy link
Copy Markdown
Collaborator Author

crosspolar commented Mar 21, 2025

Do you have a chance to check the data migrations?

@crosspolar crosspolar marked this pull request as ready for review March 21, 2025 18:18
@TomBursch TomBursch force-pushed the datetime_planner_server branch from 692458b to eca2ec8 Compare March 30, 2025 18:42
Copy link
Copy Markdown
Owner

@TomBursch TomBursch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I've only changed some minor things and fixed the migration.

@TomBursch TomBursch added the enhancement New feature or request label Mar 30, 2025
@TomBursch TomBursch merged commit 204bf12 into TomBursch:main Mar 30, 2025
1 check passed
w0s1nsk1 added a commit to w0s1nsk1/kitchenowl that referenced this pull request Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants