0

I am on a 1604 system with timezone A, after I set the timezone to B using timedatectl set-timezone B, everything work fine.('timedatectl status' is B, 'date' command showing the right time, file time is correct after i create a new one)

But i found that rsyslogd was still working on timezone A, crond was also on timezone A, no sure if there are other daemon running on the old timezone so I reboot the system to avoid this.

Why those daemons didn't be updated with the new timezone?

2
  • Generally processes get their timezone during startup, and there is no easy way to update their timezone unless you restart them. An easy way would be to restart the whole system. If you are really annoyed that some processes use the old timezone, and you seem not to have an easy way to restart them, schedule a system restart at an appropriate time.
    – FedKad
    May 23, 2019 at 9:00
  • 1
    @FedonKadifeli please don't answer questions in comments.
    – terdon
    May 23, 2019 at 11:39

2 Answers 2

0

Yes. You will need to restart the cron and rsyslog services on your system. They obtain their timezones when they start up, and don't detect overall system timezone changes.

service cron restart
service rsyslog restart
0

On Ubuntu 16.04 and forward, the most correct systemd commands to restart services are:

sudo systemctl restart cron
sudo systemctl restart rsyslog

Although service <name> stop/start/restart will work, the syntax is deprecated in favor of systemctl stop/start/restart <name>.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .