DATEFUDGE(1)
π DATEFUDGE β the manual page, but make it cute π
okay bestie, gather round, because we're talking about datefudge, a Debian classic, and honestly? it's giving time traveler. no cap. π°οΈβ¨
πΈ NAME πΈ
datefudge β pretend the system time is different
like, gaslight your programs into thinking it's 2007. respectfully. π
π¦ SYNOPSIS π¦
datefudge [-s|--static] [-l|--add-ld-preload lib] at_date program
[arguments ...]
that's it, that's the whole vibe. you give it a date, you give it a program, it lies to the program about what time it is. iconic behavior. π
β¨ DESCRIPTION β¨
so datefudge is a smol lil utility that pretends the system time is different by pre-loading a tiny library that intercepts and rewrites the time(2), gettimeofday(2) and clock_gettime(2) system calls.
that's right. it's not changing your clock. it's just telling the system calls a little white lie. main character energy fr fr. π
π DATE FORMAT π
the at_date argument can be literally any format that the date(1) program accepts, bestie. examples being:
"2007-04-01 12:21""yesterday""next Friday"
go feral. the date(1) parser has your back. π¦
π OPTIONS π
--static,-sβ marks the date as astaticone. the system calls mentioned above will always return the date you gave inat_date, no matter how much time passes. like a lil time freeze. βΈοΈ heads up though: the sub-seconds part of the returned date is always set to0. check the EXAMPLES down below for the receipts. πΈ--add-ld-preload lib,-l libβ prependslibto theLD_PRELOADenvironment variable before running your program. this is lowkey useful when you wanna inject sanitizer libraries (like the ones from Address Sanitizer) into the preload list before datefudge's own internal library gets in there. peek the EXAMPLES section, it's all explained. π--help,-hβ prints a short lil usage blurb and dips. bye bestie π--version,-vβ prints the version info and exits. π«
π EXAMPLES π
πΈ Basic examples:
$ datefudge "2007-04-01 10:23" date -R
Sun, 01 Apr 2007 10:23:00 +0200
$ datefudge "1 May 2007" date -R
Tue, 01 May 2007 00:00:00 +0200
$ datefudge "2 weeks ago" date -R
Wed, 16 Jan 2008 13:32:12 +0100
look at that. time travel, but make it fashion. β¨
π Non-static vs. static example:
$ datefudge "2007-04-01 10:23" sh -c "sleep 3; date -R"
Sun, 01 Apr 2007 10:23:03 +0200
$ datefudge --static "2007-04-01 10:23" sh -c "sleep 3; date -R"
Sun, 01 Apr 2007 10:23:00 +0200
see how the first one has :03 because 3 whole seconds passed while we were sleeping? and the static one is still stuck at :00? that's the --static magic, bestie. time said nope, we're staying here. π«Ά
π Non-static with sub-seconds example:
$ datefudge --static "2007-04-01 10:23:45.123456" date +"%F %T %N"
2007-04-01 10:23:45 000000000
not me showing you the .123456 getting absolutely flattened to 000000000 π that's the "sub-seconds always set to 0" rule in action, and now you've seen it with your own eyes.
π₯ Prepending LD_PRELOAD example:
$ datefudge --add-ld-preload /path/to/libclang_rt.asan-x86_64.so "2007-04-01 10:23" command
if that command was compiled with clang -fsanitize=address -shared-libasan, then the above command might spit out some errors, like for example:
==7625==ERROR: AddressSanitizer: heap-use-after-free on address 0x614000000044 at pc ....
and without the --add-ld-preload argument? it wouldn't work at all. like, zero. nada. the sanitizer would just be sitting there uninvited to the preload party. π
π§ AUTHOR π§
written by Matthias Urlichs</> <smurf@noris.de>. modified by Robert Luberda</> <robert@debian.org>.
shoutout to the devs, real ones fr fr. π
π BUGS π
okay so, no sugarcoating here bestie:
there is no attempt to make this change undetectable by the program. in particular, file modification times are not modified. and yeah, we know, if that's the vibe you're after, there might be such functionality in the faketime(1) program, which lives in the libfaketime Debian package. so go check that out if you need it. π
also! on systems using a 32-bit representation of time, datefudge is affected by the year 2038 problem π which might cause dates to be wrapped around, for instance:
$ TZ=UTC datefudge "2038-01-19 03:14:07" sh -c "sleep 1; date -R"
Fri Dec 13 20:45:53 UTC 1901
not the 1901 jump scare π that's the 2038 problem doing its thing. it's not a bug we introduced, it's justβ¦ math being math on 32 bits.
β COPYRIGHT β
Copyright Β© 2003 by Matthias Urlichs. Copyright Β© 2008-2024 by Robert Luberda.
there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. you may redistribute copies of datefudge under the terms of the GNU General Public License.
for more information about these matters, see the file named COPYING.
periodt. π
π SEE ALSO π
date(1), ld.so(1), time(2), gettimeofday(2), clock_gettime(2), faketime(1)
go read those too, iykyk. π«Ά
and that's the whole page, bestie! this was datefudge 1.27build1, dated January 13th, 2024, straight outta Debian. slay, stay fudged, and remember: time is a construct and you can literally just lie to it. πβ¨π¦ππ
π¦ where this page comes from
- ubuntu resolute: datefudge 1.27build1 Β· GPL-2.0-or-later
- ubuntu stonking: datefudge 1.27build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms