1
0
I am setting date with settimeofday function my hardware clock is set perfectly but when i execute date command it shows me wrong date and time.
but if i reboot the system than it show me proper date.
how to resolve this issue without reboot ?
1
0
I am setting date with settimeofday function my hardware clock is set perfectly but when i execute date command it shows me wrong date and time.
but if i reboot the system than it show me proper date.
how to resolve this issue without reboot ?
0
You need to export TZ variable for changing system time when it is not setted by default with your function.
Steps: 1. Create link of your time zone file to /etc/localtime 2. export TZ=/etc/localtime
May it helps you...
Maybe ntpd automatically set the time for you? – Phoenix – 2014-05-21T06:16:10.203
In my system i don't have ntpd as my system running with customized embedded linux. – user3360662 – 2014-05-21T06:34:34.807
1What does "wrong date and time" mean? A nonsensical value? A few hours off exactly? Always off the same amount? – David Schwartz – 2014-05-21T06:50:30.907
wrong value means previous set date and time is showing that is not same as hardware clock – user3360662 – 2014-05-21T10:38:39.703