Content-type: text/html Manpage of dateshift

dateshift

Section: Test tools (1)
Updated: 1.0
Index Return to Main Contents
 

NAME

dateshift - Moves system date for program under test  

SYNTAX

dateshift <YYYY-MM-DD> [HH:MM:SS] [ -c <program> ]  

DESCRIPTION

Moves system date for program under test. Once the date is moved the clock continues ticking, so that the program under test is now in a time warp.

dateshift is generally more convienient than changing the system clock, and does not require root privileges.

If you do not specify a command then your shell will be run.

The dates and times are in ISO-8601 format. This means that dates are YEAR-MONTH-DAY and times are HOUR:MINUTE:SECOND. Hours are in 24-hour format.  

OPTIONS

-h
Output help information and exit.
-c <command>
Specify the command to run in the date shifted environment
-v
Output version information and exit.
 

ENVIRONMENT VARIABLES

DS_OFFSET
dateshift sets this to the number of seconds offset
LD_PRELOAD
dateshift uses LD_PRELOAD to intercept calls to time() and gettimeofday()

 

EXAMPLES

You can run a program at a different time like so:

dateshift 2001-01-01 -c date

To run a time shifted shell to 20th Jan 2000 do:

dateshift 2001-01-20

Alternatively you can run it with a time as well

dateshift 2001-01-20 18:00:00  

LIMITATIONS

dateshift works via the run time linker's LD_PRELOAD mechanism. It will therefore not work on statically linked executables.

Also dateshift does not wrap stat() or other file based functions. Therefore programs which get file timestamps will still see the true time rather than the shifted time.  

AUTHORS

Alex Hornby <alex@hornby.org.uk>  

COPYRIGHT

Copyright © 2002 Alex Hornby. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  

SEE ALSO

date(1) time(2) gettimeofday(2)


 

Index

NAME
SYNTAX
DESCRIPTION
OPTIONS
ENVIRONMENT VARIABLES
EXAMPLES
LIMITATIONS
AUTHORS
COPYRIGHT
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 15:01:55 GMT, June 30, 2002