Set hwclock to UTC on linux

krupa kn picture krupa kn · Aug 16, 2012 · Viewed 12.6k times · Source

how do i set my hwclock on centos to UTC time permanently.The value changes from UTC to localtime on reboot.This is causing my application to have time drift./etc/sysconfig file UTC value also toggles from true to false after reboot.

Answer

kjohri picture kjohri · Aug 16, 2012

Run the command,

sudo hwclock --systohc --utc