Thanks Hilco. On Feb 25, 5:33 pm, Hilco Wijbenga <[email protected]> wrote: > On 25 February 2011 15:06, shahid <[email protected]> wrote: > > > I have the following piece of test code in my application (using GWT > > 2.1.0): > > > Date expiry = new Date(); > > long expiryTime = expiry.getTime(); > > expiryTime = expiryTime + (1000 * 60 * 60 * 24 * > > 90); // 90 days > > This statement is your problem. The (1000 * ... * 90) part is still > using int arithmetic and results in -813934592. Change it to something > like > > expiryTime = expiryTime + (1000L * 60 * 60 * 24 * 90); // 90 days > [Note that it's now 1000L instead of 1000.] > > Now the whole (1000L * ... * 90) will use long arithmetic instead of > int and you'll get the correct result.
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
