EnglishFrenchSpanish

OnWorks favicon

faketime - Online in the Cloud

Run faketime in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command faketime that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


faketime - manipulate the system time for a given command

SYNOPSIS


faketime [options] timestamp program [arguments...]

DESCRIPTION


The given command will be tricked into believing that the current system time is the one
specified in the timestamp. The wall clock will continue to run from this date and time
unless specified otherwise (see advanced options). Actually, faketime is a simple wrapper
for libfaketime, which uses the LD_PRELOAD mechanism to load a small library which
intercepts system calls to functions such as time(2) and fstat(2). This wrapper exposes
only a subset of libfaketime's functionality; please refer to the README file that came
with faketime for more details and advanced options, or have a look at
http://github.com/wolfcw/libfaketime

OPTIONS


--help show usage information and quit.

--version
show version information and quit.

-m use the multi-threading variant of libfaketime.

-f use the advanced timestamp specification format.

EXAMPLES


faketime 'last Friday 5 pm' /bin/date
faketime '2008-12-24 08:15:42' /bin/date
faketime -f '+2,5y x10,0' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done'
faketime -f '+2,5y x0,50' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done'
faketime -f '+2,5y i2,0' /bin/bash -c 'while true; do date ; sleep 1 ; done'
In this single case all spawned processes will use the same global clock without restaring it at the start of each process.

(Please note that it depends on your locale settings whether . or , has to be used for fractional offsets)

ADVANCED TIMESTAMP FORMAT


The simple timestamp format used by default applies the /bin/date -d command to parse
user-friendly specifications such as 'last friday'. When using the faketime option -f, the
timestamp specified on the command line is directly passed to libfaketime, which enables a
couple of additional features such as speeding the clock up or slowing it down for the
target program. It is strongly recommended that you have a look at the libfaketime
documentation. Summary:

Freeze clock at absolute timestamp: "YYYY-MM-DD hh:mm:ss"
If you want to specify an absolute point in time, exactly this format must be used.
Please note that freezing the clock is usually not what you want and may break the
application. Only use if you know what you're doing!

Relative time offset: "[+/-]123[m/h/d/y], e.g. "+60m", "+2y"
This is the most often used format and specifies the faked time relatively to the
current real time. The first character of the format string must be a + or a -. The
numeric value by default represents seconds, but the modifiers m, h, d, and y can
be used to specify minutes, hours, days, or years, respectively. For example, "-2y"
means "two years ago". Fractional time offsets can be used, e.g. "+2,5y", which
means "two and a half years in the future". Please note that the fraction delimiter
depends on your locale settings, so if "+2,5y" does not work, you might want to try
"+2.5y".

Start-at timestamps: "@YYYY-MM-DD hh:mm:ss"
The wall clock will start counting at the given timestamp for the program. This can
be used for specifying absolute timestamps without freezing the clock.

ADVANCED USAGE


When using relative time offsets or start-at timestamps (see ADVANCED TIMESTAMP FORMAT
above and option -f), the clock speed can be adjusted, i.e. time may run faster or slower
for the executed program. For example, "+5y x10" will set the faked time 5 years into the
future and make the time pass 10 times as fast (one real second equals 10 seconds measured
by the program). Similarly, the flow of time can be slowed, e.g. using "-7d x0,2", which
will set the faked time 7 days in the past and set the clock speed to 20 percent, i.e. it
takes five real world seconds for one second measured by the program. Again, depending on
your locale, either "x2.0" or "x2,0" may be required regarding the delimiter. You can also
make faketime to advance the reported time by a preset interval upon each time() call
independently from the system's time using "-7d i2,0", where "i" is followed by the
increase interval in seconds.

Faking times for multiple programs or even system-wide can be simplified by using
~/.faketimerc files and /etc/faketimerc. Please refer to the README that came with
faketime for warnings and details.

Use faketime online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    PAC Manager
    PAC Manager
    PAC is a Perl/GTK replacement for
    SecureCRT/Putty/etc (linux
    ssh/telnet/... gui)... It provides a GUI
    to configure connections: users,
    passwords, EXPECT regula...
    Download PAC Manager
  • 2
    GeoServer
    GeoServer
    GeoServer is an open-source software
    server written in Java that allows users
    to share and edit geospatial data.
    Designed for interoperability, it
    publishes da...
    Download GeoServer
  • 3
    Firefly III
    Firefly III
    A free and open-source personal finance
    manager. Firefly III features a
    double-entry bookkeeping system. You can
    quickly enter and organize your
    transactions i...
    Download Firefly III
  • 4
    Apache OpenOffice Extensions
    Apache OpenOffice Extensions
    The official catalog of Apache
    OpenOffice extensions. You'll find
    extensions ranging from dictionaries to
    tools to import PDF files and to connect
    with ext...
    Download Apache OpenOffice Extensions
  • 5
    MantisBT
    MantisBT
    Mantis is an easily deployable, web
    based bugtracker to aid product bug
    tracking. It requires PHP, MySQL and a
    web server. Checkout our demo and hosted
    offerin...
    Download MantisBT
  • 6
    LAN Messenger
    LAN Messenger
    LAN Messenger is a p2p chat application
    for intranet communication and does not
    require a server. A variety of handy
    features are supported including
    notificat...
    Download LAN Messenger
  • More »

Linux commands

  • 1
    abidw
    abidw
    abidw - serialize the ABI of an ELF
    file abidw reads a shared library in ELF
    format and emits an XML representation
    of its ABI to standard output. The
    emitted ...
    Run abidw
  • 2
    abilint
    abilint
    abilint - validate an abigail ABI
    representation abilint parses the native
    XML representation of an ABI as emitted
    by abidw. Once it has parsed the XML
    represe...
    Run abilint
  • 3
    coresendmsg
    coresendmsg
    coresendmsg - send a CORE API message
    to the core-daemon daemon ...
    Run coresendmsg
  • 4
    core_server
    core_server
    core_server - The primary server for
    SpamBayes. DESCRIPTION: Currently serves
    the web interface only. Plugging in
    listeners for various protocols is TBD.
    This ...
    Run core_server
  • 5
    fwflash
    fwflash
    fwflash - program to flash image file
    to a connected NXT device ...
    Run fwflash
  • 6
    fwts-collect
    fwts-collect
    fwts-collect - collect logs for fwts
    bug reporting. ...
    Run fwts-collect
  • More »

Ad