LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   alternative command of stime() (https://www.linuxquestions.org/questions/linux-software-2/alternative-command-of-stime-4175426091/)

rambolinuxbuddy 09-07-2012 03:31 AM

alternative command of stime()
 
hello all,


my embedded system does not seem to have stime() (to set the system time).
So anybody have idea of any alternative command to stime().
C command is preferred.


Hoping for quick reply.

thank you.

jv2112 09-07-2012 04:34 AM

Try hwclock as root & you should be set.

Quote:

NAME
hwclock - query or set the hardware clock (RTC)

SYNOPSIS
hwclock [function] [option...]

DESCRIPTION
hwclock is a tool for accessing the Hardware Clock. You can display
the current time, set the Hardware Clock to a specified time, set the
Hardware Clock from the System Time, or set the System Time from the
Hardware Clock.

You can also run hwclock periodically to add or subtract time from the
Hardware Clock to compensate for systematic drift (where the clock con-
sistently loses or gains time at a certain rate when left to run).






All times are GMT -5. The time now is 08:13 PM.