You can set the timezone using timedatectl
List time zones
timedatectl list-timezones
Set time zone. Replace America/Chicago with your timezone.
timedatectl set-timezone America/Chicago
You can set the timezone using timedatectl
List time zones
timedatectl list-timezones
Set time zone. Replace America/Chicago with your timezone.
timedatectl set-timezone America/Chicago
The -T option lets dmesg show user readable time.
Example:
$ dmesg -t ... [Sat Nov 15 12:15:12 2019] CPU1: Package temperature/speed normal [Sat Nov 15 12:14:12 2019] CPU3: Package temperature/speed normal [Sat Nov 15 12:14:12 2019] CPU0: Package temperature/speed normal [Sat Nov 15 12:14:12 2019] CPU4: Package temperature/speed normal $
dmesg time options
$ dmesg -h | grep time -d, --show-delta show time delta between printed messages -e, --reltime show local time and time delta in readable format -T, --ctime show human-readable timestamp (may be inaccurate!) -t, --notime don't show any timestamp with messages --time-format show timestamp using the given format: [delta|reltime|ctime|notime|iso] Suspending/resume will make ctime and iso timestamps inaccurate.
Install NTP
yum install ntp -y
Enable ntpd service
systemctl enable ntpd
The file /etc/localtime is a symbolic link to the timezone. All the timezones are listed in /usr/share/zoneinfo/
Replace America/New_York with the appropriate timezone.
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
You can view the current time zone with the following command
timedatectl
or with date
date +"%Z %z"