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: https://travis-ci.org/bokov/tidbits/jobs/633407105

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 https://travis-ci.org/BanzaiMan/travis_production_test/builds/633444698#L97, 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…

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ntpdate -u time.apple.com; fi

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

https://travis-ci.org/bokov/tidbits/builds/633438010

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