-
Task
-
Resolution: Unresolved
-
None
-
None
-
Medium
-
Emptyshow more show less
Problem
currently we use the field "orderdate" to select tasks which are "old"
->where('`orderDate` >= (CURRENT_DATE - INTERVAL ? DAY)', $lastDaysFilter);
Solution
we should not use the field "orderdate", which is not even a mandatory field, but the field "created" to check how "old " a task is.
You have to pay attention when changing the where-statement, because field "created" is of type TIMESTAMP and not DATETIME which may need a different handling for comparing.
additional hint
I just stumbled over this (which I asked ChatGPT):
Kann TIMESTAMP nicht für ein Datum nach 2038 verwendet werden?
Gute Frage – die kurze Antwort lautet:
Standardmäßig NEIN, TIMESTAMP in MariaDB (wie auch in MySQL) kann keine Daten nach dem 19. Januar 2038 speichern – wegen der 32-Bit-Grenze des Unix-Timestamps.
So.. we still have 13 years and then all TIMESTAMP fields are.. hmmm.. whatever.