Getting error about incorrect system time

The system clock is reported as being incorrectly set…

* checking for future file timestamps ... ERROR
This system is set to the wrong time: please correct
   system: 2020-01-06 19:09 (UTC)
  correct: 2020-01-06 18:28 (UTC)

…in this MacOS build:

The Linux ones run fine.

How is this test structured?

This job finished at 19:00:19 UTC, which is way off from the time stamps indicated.

My quick test on the Mac shows close proximity to the correct time, so I am not sure how things are so far off on yours.

Apparently it’s one of the standard checks used by the CRAN repository for packages written in the R language.

You’re right, the drift might be a different type of problem than what you had.

However, I think I might have gotten a fix for this. In my .travis.yml file I put…

  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ntpdate -u; fi

Now the build works (thought it might be an intermittent problem and it’s just coincidence that it started working).

A possible explanation is that it’s a problem with only some of VMs/VM hosts.