OK, so the 1329847846391 is actually 2012-02-21 so the check below is working 
as expected.  The issue was actually caused by the following:
DateTime paymentNext = new 
DateTime(billingAccount.getPaymentNext()).plus(Months.ONE);

When that happened the we logged out:
Next payment will be 2012-03-21T18:10:46.391Z

But the value written to the DB was: 1329847846391

Hmmm--  
Dan Washusen
Make big files fly
visit digitalpigeon.com (http://digitalpigeon.com)



On Friday, 2 March 2012 at 9:25 AM, Dan Washusen wrote:

> Hey all,  
> We're seeing some very odd behaviour and I think it's to do with the leap 
> year.  The code in question is:
>  
> Instant someDate = new Instant(1329847846391); // 2012-03-21T18:10:46.391Z
> if (someDate.isAfterNow()) {
> throw new IllegalStateException()
> }
>  
>  
> The systems current date is: Thu Mar  1 21:06:59 UTC 2012
>  
> Obviously the 21st of March 2012 is well after the 1st of march but it passes 
> the check and goes through (charging a credit card)… Any ideas?  My guess is 
> that it's something to do with the leap year…?  
>  
> Cheers,
> Dan

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to