On Fri, 14 Feb 2014 16:21:52 -0500
shawn wilson <ag4ve...@gmail.com> wrote:

> What I want is to be able to make a program /think/ that it's like a
> week in the future without messing with the system time at all. So
> something that overrides gmtime and localtime and the like with some
> starting point would be awesome. Anything like that?
> 

Time::Fake on CPAN appears to fit the bill:

https://metacpan.org/pod/Time::Fake

Install it, then e.g.:

perl -MTime::Fake="+20y" yourscript.pl

(See the docs for the various options etc.)


-- 
David Precious ("bigpresh") <dav...@preshweb.co.uk>
http://www.preshweb.co.uk/     www.preshweb.co.uk/twitter
www.preshweb.co.uk/linkedin    www.preshweb.co.uk/facebook
www.preshweb.co.uk/cpan        www.preshweb.co.uk/github



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to