1DATEFUDGE(1) Debian DATEFUDGE(1)
2
3
4
6 datefudge - pretend the system time is different
7
9 datefudge [-s|--static] at_date program [arguments ...]
10
12 datefudge is a small utility that pretends that the system time is dif‐
13 ferent by pre-loading a small library which modifies the time(2), get‐
14 timeofday(2) and clock_gettime(2) system calls.
15
17 The at_date argument can be given in any format accepted by the date(1)
18 program, for example "2007-04-01 12:21" or "yesterday", or "next Fri‐
19 day".
20
22 --static, -s
23 Mark the date as a `static' one. The above mentioned system
24 calls will always return the date given in the at_date argument,
25 regardless of time passing. See EXAMPLES
26 below.
27
28 --help, -h
29 Print short usage information and exit.
30
31 --version, -v
32 Print version information and exit.
33
35 Basic examples:
36 $ datefudge "2007-04-01 10:23" date -R
37 Sun, 01 Apr 2007 10:23:00 +0200
38
39 $ datefudge "1 May 2007" date -R
40 Tue, 01 May 2007 00:00:00 +0200
41
42 $ datefudge "2 weeks ago" date -R
43 Wed, 16 Jan 2008 13:32:12 +0100
44
45 Non-static vs. static example:
46 $ datefudge "2007-04-01 10:23" sh -c "sleep 3; date -R"
47 Sun, 01 Apr 2007 10:23:03 +0200
48
49 $ datefudge --static "2007-04-01 10:23" sh -c "sleep 3; date -R"
50 Sun, 01 Apr 2007 10:23:00 +0200
51
53 Written by Matthias Urlichs <smurf@noris.de>. Modified by Robert
54 Luberda <robert@debian.org>.
55
57 There is no attempt to make this change undetectable by the program.
58 In particular, file modification times are not modified.
59
60 On systems using 32-bit representation of time, datefudge is affected
61 by the year 2038 problem, which might cause dates to be wrapped around,
62 for instance:
63 $ TZ=UTC datefudge "2038-01-19 03:14:07" sh -c "sleep 1; date -R"
64 Fri Dec 13 20:45:53 UTC 1901
65
67 Copyright © 2003 by Matthias Urlichs.
68 Copyright © 2008-2017 by Robert Luberda.
69
70 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
71 PARTICULAR PURPOSE. You may redistribute copies of datefudge under the
72 terms of the GNU General Public License.
73 For more information about these matters, see the file named COPYING.
74
76 date(1), ld.so(1), time(2), gettimeofday(2), clock_gettime(2)
77
78
79
80datefudge 1.22 February 4th, 2017 DATEFUDGE(1)