[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fingir fecha y hora



Santiago Vila dijo:
> Busca en google por "libfaketime". 

Jolín, no hay nada como buscar bien :-)
Yo venga a poner cadenas, pero ninguna era esa :-)

En fin, que muchas gracias, era exactamente lo que necesitaba.

Además es facilísimo de usar:

/************************************************************************/
/* Copyright 1999, Ondrejicka Stefan <ondrej@idata.sk>                  */
/*                                                                      */
/*      http://www.idata.sk/~ondrej/sw/fake_time.c                      */
/*                                                                      */
/* This is source for replacement of time funcion, which enables you    */
/* to travel in time. It is usable for testing or it should help        */
/* if you have any program which expires in any time period and uses    */
/* shared libraries. I wrote this, because I want to get my old         */
/* expired netscape to work for me.                                     */
/*                                                                      */
/* Compilation :                                                        */
/* gcc -fPIC -g -c fake_time.c                                          */
/* gcc -shared -W,-soname,libfaketime.so -o libfaketime.so fake_time.o  */
/*                                                                      */
/* Usage:                                                               */
/*   set library libfaketime.so to load before any other :              */
/*   export LD_PRELOAD=`pwd`/libfaketime.so                             */
/*   then set env variable FAKE_TIME_DIFF to amount of seconds to       */
/*   travel in time (positive goes in past , nogative to future)        */
/*   export FAKE_TIME_DIFF=-1000000                                     */
/*   than you should see with date command where are you in time :-)    */
/************************************************************************/

Al loro:

amaya@pierced>date
mar abr  2 15:07:41 CEST 2002
amaya@pierced>export LD_PRELOAD=`pwd`/libfaketime.so
amaya@pierced>export FAKE_TIME_DIFF=-259200
amaya@pierced>date
vie abr  5 15:09:37 CEST 2002

3 días en el futuro, tal cual!

> En cualquier caso, se podría coger el código fuente de fakeroot, que
> hace cosas parecidas.

Me sobre-estimas :-)
Pero me lo miraré.

-- 
 .''`.                    Same shit, different day...
: :' :
`. `'         Proudly running Debian GNU/Linux Sid (Kernel 2.4.18)  
  `-        www.amayita.com  www.malapecora.com  www.chicasduras.com


-- 
To UNSUBSCRIBE, email to debian-user-spanish-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: