R cmd check note: unable to verify current time

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)

Tags:

R