#1093264 faketime breaks date --utc

Package:
faketime
Source:
faketime
Description:
Report faked system time to programs (command-line tool)
Submitter:
Olly Betts
Date:
2025-01-17 09:45:04 UTC
Severity:
normal
Tags:
#1093264#5
Date:
2025-01-17 01:55:37 UTC
From:
To:
It seems faketime prevents date's --utc option from working - under
faketime date gives the same output with or without --utc (NZDT is my
local timezone):

$ date
Fri 17 Jan 2025 14:44:50 NZDT
$ date --utc
Fri 17 Jan 2025 01:44:50 UTC
$ faketime -f '1980-12-08 00:00:00' date
Mon 08 Dec 1980 00:00:00 NZDT
$ faketime -f '1980-12-08 00:00:00' date --utc
Mon 08 Dec 1980 00:00:00 NZDT

I would expect the last command to report:

Sun 07 Dec 1980 11:00:00 UTC

I've filed at the default priority as I'm not sure what's going on and
so don't know what the full impact of this is.

Cheers,
    Olly

#1093264#10
Date:
2025-01-17 09:40:38 UTC
From:
To:
How odd.  This appears to be the same as upstream ticket #444

I investigated a bit myself and I don't have an explanation.  I
haven't got out the source code for gnulib, which (from the upstream
ticket) seems like the next step.  I did some other experiments and
the behaviour is certainly odd.  I notice that your time
specification, `1980-12-08 00:00:00`, doesn't state the timezone; that
probably isn't helping.

I propose to leave the severity at normal for now.  As a workaround,
`TZ=UTC date` may help (but may change the interpretation of your time
specification).

Thanks,
Ian.
(not the maintainer, just trying to fix faketime for the moment)