Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-4772

T5Connect Controller: change field for selection of old tasks

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • None
    • None
    • t5connect

      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.

            axelbecher Axel Becher
            Stephan Stephan Bergmann
            Stephan Bergmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: