I also use a travel Pi-hole connected to a router that I carry with me (somewhat similar to your setup).
As others have noted, the Pi does not contain an internal clock, and relies on external ntp servers to set the time. This leads to the problem where the Pi time is off, and it can't reach an ntp server to set the time. Endless loop.
Additionally, even if the Pi can reach an ntp server, if the time on the Pi is off by more than 1,000 seconds, it won't automatically sync the time.
Steps you will want to take:
-
Set the nameserver on the Pi to something other than Pi-hole. Cloudflare, Google, Quad 9, whatever you like.
-
Install an add-on RTC.
-
If the two steps above don't work, here is what you can do when you set up the Pi at the remote site.
-
Using the configuration software (raspi-config or similar), set the timezone to your actual location.
-
If needed, manually set the time. Either of these commands will do it (you will need to change the parameters to the correct date/time):
`sudo date --set="21 December 2018 11:53:30"` `timedatectl set-time '2015-11-20 16:14:50'`
The RTC on my travel Pi has failed and I need to do these steps when I travel.
There is also an ntpd package that you can install. This allows you to override the 1,000 second error and force a time refresh.
The ntpd utility is an operating system daemon which sets and maintains the system time of day in synchronism with Internet standard time servers. It is a complete implementation of the Network Time Protocol (NTP) version 4, as defined by RFC-5905, but also retains compatibility with version 3, as defined by RFC-1305, and versions 1 and 2, as defined by RFC-1059 and RFC-1119, respectively.'
-g, --panicgate
Allow the first adjustment to be Big. This option may appear an unlimited number of times.
Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options. See the tinker configuration file directive for other options.