Bug 256975 - devel/libfaketime: faketime(1) example doesnt run: Error: Timestamp to fake not recognized
Summary: devel/libfaketime: faketime(1) example doesnt run: Error: Timestamp to fake n...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-07-04 12:29 UTC by Li-Wen Hsu
Modified: 2023-10-11 12:55 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (bofh)
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Li-Wen Hsu freebsd_committer freebsd_triage 2021-07-04 12:29:20 UTC
faketime(1) doesn't work even with its example:

$ faketime '2008-12-24 08:15:42' /bin/date
date: illegal option -- d
usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]]
            [-I[date | hours | minutes | seconds]]
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
Error: Timestamp to fake not recognized, please re-try with a different timestamp.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-05 00:08:07 UTC
@Reporter Please report upstream and include an upstream link in the See Also field once created. I can liaise with upstream accordingly.
Comment 2 Dmitry Ivanov 2021-10-04 12:10:36 UTC
# LD_PRELOAD=/usr/local/lib/faketime/libfaketime.so.1 FAKETIME="+300 d" date

or

# export LD_PRELOAD=/usr/local/lib/faketime/libfaketime.so.1 
# FAKETIME="+300 d" date
Comment 3 Rene Ladan freebsd_committer freebsd_triage 2022-03-07 19:55:19 UTC
Maintainer reset.
Comment 4 Michael Osipov 2023-10-11 12:55:03 UTC
(In reply to Dmitry Ivanov from comment #2)

This works, faketime itself does not! Thank for the tip!