Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-85563

Mock clocks now method does not always use system timezone

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.4.9, 4.5.5, 5.0.1
    • Unit tests

      When the mock frozen clock is used without a timestamp

      $this->mock_clock_with_frozen();
      

      or using an incrementing clock in any way

      $this->mock_clock_with_incrementing();
      

      $this->mock_clock_with_incrementing(12345678);
      

      the `clock::now()` method will return `DateTimeImmutable` objects that are using the UCT timezone, rather than the server time.

      They should return the server time zone as the system_clock does.

            nmagill Neill Magill
            nmagill Neill Magill
            Luca Bösch Luca Bösch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

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