Hi Stephen
 Once the time is shifted using  DateTimeUtils.setCurrentMillisOffset(millis
);
Will that changed time be reflected in all the APIs provided by Joda time ?

Thanks
Nishantha


On Thu, May 9, 2013 at 2:40 PM, Stephen Colebourne <scolebou...@joda.org>wrote:

> Joda-Time allows you to change the clock used by Joda-Time code, but
> not to change System.currentTimeMillis(). So I don't think Joda-Time
> will overly help you.
> Stephen
>
> On 9 May 2013 05:43, nishantha pradeep <nishan...@opensource.lk> wrote:
> > Hi All
> >
> > I am working on an enterprise application running in JBOSS application
> > server. The application records product subscriptions and creates
> > transactions once a month.
> >
> > I want to develop an automated test case in which it makes a
> subscription,
> > shifts the date by 10 months and creates transactions(10 transactions
> need
> > to be created now).
> >
> > We were trying to use a solution described in
> > http://virgo47.wordpress.com/2012/06/22/changing-system-time-in-java/link
> > but the problem is it changes the time of whole JVM.
> >
> > Then we decided refactor the code and get all the time related functions
> to
> > a one EJB service. Inside the service Java provided time related
> functions
> > are used. Again the problem here is there can be 3rd party libraries
> those
> > have used the Java provided time functions directly. Therefore this
> solution
> > is also not going to work.
> >
> > There are placed where they have mentioned that Joda-time can be used for
> > this matter (stackoverflow). But I was not able to figure out how.
> >
> > So I would be very thankful if someone could provide me guideline to over
> > come my problem.
> >
> > Thanks
> >
> > Nishantha
> >
> >
> >
> ------------------------------------------------------------------------------
> > Learn Graph Databases - Download FREE O'Reilly Book
> > "Graph Databases" is the definitive new guide to graph databases and
> > their applications. This 200-page book is written by three acclaimed
> > leaders in the field. The early access version is available now.
> > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> > _______________________________________________
> > Joda-interest mailing list
> > Joda-interest@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/joda-interest
> >
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to