See libfaketime on github for upstream project site general overview.
#!/usr/bin/env bash
set -Eeuo pipefail
LIBFAKETIME_SOURCE_PATH=$PWD/libfaketime
LIBFAKETIME_INSTALL32_PREFIX=$PWD/install-x86
LIBFAKETIME_INSTALL64_PREFIX=$PWD/install-x86_64
[[ -d $LIBFAKETIME_SOURCE_PATH ]] || git clone https://github.com/wolfcw/libfaketime.git
make -C $LIBFAKETIME_SOURCE_PATH PREFIX=$LIBFAKETIME_INSTALL64_PREFIX distclean install | tee build64.log
CFLAGS="-m32" LDFLAGS="-m32" make -C $LIBFAKETIME_SOURCE_PATH PREFIX=$LIBFAKETIME_INSTALL32_PREFIX distclean install | tee build32.log
# generate scripts for shell environment
echo "export LD_PRELOAD=$LIBFAKETIME_INSTALL32_PREFIX/lib/faketime/libfaketime.so.1" > libfaketime32.env
echo "export LD_PRELOAD=$LIBFAKETIME_INSTALL64_PREFIX/lib/faketime/libfaketime.so.1" > libfaketime64.env
64-bit application in 64-bit WINEPREFIX:
$ date
Sat Oct 19 19:11:58 CEST 2019
$ (source libfaketime64.env ; FAKETIME="-1y" wine64 "c:/windows/system32/cmd.exe" /c date /t)
Current Date is 10/19/2018
32-bit application in 64-bit WINEPREFIX:
$ date
Sat Oct 19 19:11:58 CEST 2019
$ (source libfaketime32.env ; FAKETIME="-1y" wine "c:/windows/syswow64/cmd.exe" /c date /t)
Current Date is 10/19/2018
NOTE: Since Wine 7.2, libfaketime doesn't work anymore for 32-bit processes due to missing 64-bit time_t support. See my comment
Links
Thank you, bisecting the root cause all the way to 2022 is really going above and beyond on a bug report on a gist first published in the previous decade!
After reviewing your reply and the recent libfaketime author reply ( wolfcw/libfaketime#418 (comment) ), I believe the path of least resistance for me is to wait for https://gitlab.winehq.org/wine/wine/-/releases/wine-9.0#wow64 to be enabled by default which should allow using 64bit wine to run the 32bit executable.
At this time, this support requires also building your own wine, like your workaround, but I would recommend others who end up here to attempt wow64 support first since it sounds promising. So, the third option which would be:
$ (source libfaketime64.env ; FAKETIME="-1y" wine64 "c:/windows/syswow64/cmd.exe" /c date /t)