1 .TH FAKE-HWCLOCK 8 "5 April 2012" Debian
3 fake-hwclock \- Control fake hardware clock
5 \fBfake-hwclock\fP [ \fIcommand\fP ] [ \fBforce\fP ]
7 Many embedded Linux systems do not have a functional hardware clock. Either
8 they simply don't have a hardware clock at all or they have a hardware clock
9 but it is not usable (e.g. because Linux doesn't know how to use it or because
10 no battery is present).
12 This can lead to time moving backwards to some default value (often 1970) when
13 the system is rebooted. Since lots of software assumes that time only moves
14 forward this is a bad thing. NTP can (and should where practical) be used to
15 sync with an external timeserver but it is not available early in the boot
16 process and may be unavailable for other reasons.
18 \fBfake-hwclock\fP sets and queries a fake "hardware clock" which stores the
19 time in a file. This program may be run by the system administrator
20 directly but is typically run by init (to load the time on startup and
21 save it on shutdown) and cron (to save the time hourly).
23 If no command is given then fake-hwclock acts as if the save command was used.
28 Save the time to the file.
31 Load the time from the file. If force is specified fake-hwclock will move the
32 clock either backwards or forwards. Otherwise it will only move it forwards.
36 \fB/etc/fake-hwclock.data\fR
37 The file used to store the time
39 \fB/etc/init.d/fake-hwclock\fR
40 The init script used to run fake-hwclock on startup and shutdown
42 \fB/etc/default/fake-hwclock\fR
43 Settings file for the init script.
45 \fB/etc/cron.hourly/fake-hwclock\fR
46 Cron job used to save the time hourly
47 .SH ENVIRONMENT VARIABLES
51 set the file used by fake-hwclock
53 1 is returned for invalid commands. 0 is returned in all other cases.
55 This approach can only provide a crude approximation of what a real hardware
56 clock provides. Use of NTP or another method to keep the time in sync is