Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4773

Database activity: creating an entry in offline says it was edited on year 57105

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.5.0
    • Database add-on
    • Hide

      Test on any device of your choice:

      1. On a database activity, which shows time added and modified dates on each entry.
      2. Create an entry offline.
      3. Check the time added and modified are today's date.
      4. Sync and check it shows correct date.
      5. Edit the entry in offline.
      6. Check the time modified are today's date.
      7. Sync and check it shows correct date.
      Show
      Test on any device of your choice: On a database activity, which shows time added and modified dates on each entry. Create an entry offline. Check the time added and modified are today's date. Sync and check it shows correct date. Edit the entry in offline. Check the time modified are today's date. Sync and check it shows correct date.
    • MOODLE_405_STABLE
    • Moodle Apps Sprint 2025-I1.4

      This happens because the app always multiplies timemodified by 1000 because it assumes the timestamp is in seconds, but when creating an offline entry the timestamp is in milliseconds. This probably affects timecreated too.

      Also, I saw that in the sync process we're probably comparing an "online timemodified" (seconds) with an "offline timemodified" (milliseconds).

      We should probably store the times in seconds in the app DB, or convert them as soon as they're read to be sure they're consistent everywhere.

            pferre22 Pau Ferrer
            dpalou Dani Palou
            Dani Palou Dani Palou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 27 minutes
                3d 27m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.