0

/etc/localtime is a symlink to Budpaest
/etc/timezone is Budapest

root@server:~# cat /etc/adjtime 
LOCAL

root@server:~# date
Sun Aug  6 06:58:42 UTC 2017

So all my crons using UTC, how can I use local time?

1 Answer 1

0

You actually should have all your time in UTC and then only /etc/localtime linked to particular timezone. Or you could run NTP client.

So what I would suggest are this steps:

  • remove /etc/localtime link
  • Adjust your systemtime to UTC via date command.
  • Use hwclock --systohc to set the system clock to UTC as well
  • Now use the tz-select or just do the ln -s /usr/share/zoneinfo/CET /etc/localtime
  • Also you could consider installing some of the ntp clients or ntpd too on that way you will always have correct date and time outputs.
1
  • no problem you are welcome that is proper way to setup time on Unix and Linux systems.
    – MarkoShiva
    Commented Aug 11, 2017 at 23:39

You must log in to answer this question.

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