Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set hwclock to UTC on linux

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.

like image 368
krupa kn Avatar asked Oct 06 '22 22:10

krupa kn


1 Answers

Run the command,

sudo hwclock --systohc --utc
like image 178
kjohri Avatar answered Oct 13 '22 05:10

kjohri