Troubleshooting Time

Please read this entire document before taking any action.

In the Reactor UI's top bar, to the right of its connection state indicator, are two clocks. The upper clock is your local browser time, and the lower clock is the host time (that is, the time of the system running Reactor).

All automations run in the time of the host. If an automation is set to trigger between 1pm and 3pm, that means between 1pm and 3pm on the host. The browser's time is irrelevant for automation.

If the two clocks do not display the same time within a few seconds, are you (and your browser) in a different time zone from the Reactor host at the moment? If you are sitting in San Francisco, California checking in on your house in Bar Harbor, Maine (three time zones distant), it would be expected to see a three hour time difference between the upper and lower clocks, as you and the host are in two different time zones that are three hours apart.

If that's not the case:

  • Your host system or your browser system has incorrect time zone settings;
  • Your host system or your browser system is not synchronizing to network time.

To check the host system's time configuration, request http://your-host-ip:8111/diag/sun in a browser. This will display Reactor's interpretation of the time zone and location settings and show you the current host time and solar event times for that day. If these are not correct, check your host or docker container time zone settings, and your location configuration in reactor.yaml.

If you are running Reactor in a docker container, the container will have its own time zone configuration that is completely independent of the host's configured time zone. It is quite common to see a host system configured for a local time zone and yet see every docker container running in the default UTC time zone, and since many containers don't really care about time operationally, you may never notice. Reactor cares, though. The Reactor installation documentation for docker containers gives specific instructions for setting the correct time zone on the container, so make sure you've done that. When upgrading Reactor, it often happens (particularly, it seems, among users using Portainer) that the time zone setting is lost during the upgrade.

If the time zone and location settings for the host/container are correct but the time is not accurate, it's likely that your host system is not running ntpd or an equivalent service, or it has stopped for some reason. The ntpd synchronizes your host system to well-known network time servers. Most new OS installations will install ntpd or an equivalent service at boot, but it's still worth checking into.

Finally, make sure you do not have test_time set in your reactor.yaml configuration (in the engine section). This configuration setting can be used to help test time-based tasks by forcing Reactor to think it is whatever time you set, but if you forget to remove it after testing, your system will forever run in this time warp ("Dormammu, I've come to bargain!").

If the host time and time zone are all correct but the displayed clocks are still far divergent, try hard-refreshing your browser. If that doesn't do it, it's a browser/client system time or time zone configuration problem that you'll need to troubleshoot.

Updated: 2022-Apr-29