Joda-Time has methods on DateTimeUtils to control the time seen by
Joda-Time methods. You should be able to use those to control the
current time.
http://joda-time.sourceforge.net/api-release/org/joda/time/DateTimeUtils.html
Stephen

On 22 April 2010 11:10, Morgan Mörtsell <mor...@storumanenergi.se> wrote:
> I have a home-made toolkit which lets me virtually change the current time.
> The program normally uses real time, but when I run my unit-tests it uses
> virtual time.
> Very handy when testing code which requires simulating long periods of time.
>
> Alas this prevents me from using methods like 'isBeforeNow' or 'isAfterNow'.
> Is there some way to do this with joda-time?
>
> /Morgan
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
>

------------------------------------------------------------------------------
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to