Package: faketime
Version: 0.9.6-7+b1
1. faketime does not properly validate the supplied advanced timestamp
format:
$ faketime -f '2018-06-26 09:00:03+02:00' date -R
Tue, 26 Jun 2018 09:00:03 +0100
$ date -R -d '2018-06-26 09:00:03+02:00'
Tue, 26 Jun 2018 08:00:03 +0100
$
2. There is no way to specify a time which does not depend on the
timezone in force. This is quite awkward, because there are some
times which, in some timezones, cannot be represented in the
offered `advanced timestamp format'.
$ TZ=Europe/London date -d @$(( 1540683000 + 3600 * 0 )) -R
Sun, 28 Oct 2018 00:30:00 +0100
$ TZ=Europe/London date -d @$(( 1540683000 + 3600 * 1 )) -R
Sun, 28 Oct 2018 01:30:00 +0100
$ TZ=Europe/London date -d @$(( 1540683000 + 3600 * 2 )) -R
Sun, 28 Oct 2018 01:30:00 +0000
$ TZ=Europe/London date -d @$(( 1540683000 + 3600 * 3 )) -R
Sun, 28 Oct 2018 02:30:00 +0000
$ TZ=Europe/London faketime -f '2018-10-28 01:30:00' date -R
Sun, 28 Oct 2018 01:30:00 +0000
$
The problem is that
"2018-10-28 01:30:00 London time"
occurs twice, at both of
Sun, 28 Oct 2018 01:30:00 +0100 = Sun, 28 Oct 2018 00:30:00 +0000
and
Sun, 28 Oct 2018 01:30:00 +0000
faketime makes it impossible to specify the former.
This can be worked around by saving and restoring TZ:
env TZ=UTC faketime -f <something> env TZ="$TZ" <actual command...>
I suggest that these bugs be fixed by interpreting a numeric timezone
offset in RFC3339 format, as shown above. This should be done for
both the absolute frozen time, and the start-at timestamp.
Thanks,
Ian.
-- System Information:
Debian Release: 9.5
APT prefers stable-debug
APT policy: (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.16.0-0.bpo.2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages faketime depends on:
ii libc6 2.24-11+deb9u3
ii libfaketime 0.9.6-7+b1
faketime recommends no packages.
faketime suggests no packages.
-- no debconf information