R cmd check note: unable to verify current time

When running R CMD check I get the following note:

checking for future file timestamps ... NOTE
  unable to verify current time

I have seen this discussed here, but I am not sure which files it is checking for timestamps, so I'm not sure which files I should look at. This happens locally on my windows and remotely on different systems (using github actions).


Take a look at https://svn.r-project.org/R/trunk/src/library/tools/R/check.R The check command relies on an external web resource:

     now <- tryCatch({
     foo <- suppressWarnings(readLines("http://worldclockapi.com/api/json/utc/now",
                             warn = FALSE))

This resource http://worldclockapi.com/ is currently not available.

Hence the following happens (see same package source):

            if (is.na(now)) {
                any <- TRUE
                noteLog(Log, "unable to verify current time")

See also references: https://community.rstudio.com/t/r-devel-r-cmd-check-failing-because-of-time-unable-to-verify-current-time/25589

So, unfortunately this requires a fix in the check function by the R development team ... or the web-resource coming online again.


To add to qasta's answer, you can silence this check by setting the _R_CHECK_SYSTEM_CLOCK_ environment variable to zero e.g Sys.setenv('_R_CHECK_SYSTEM_CLOCK_' = 0)