2038? 2008.. + 30 ... = 2038. Which is the year the 32 bit time_t field overflows and goes negative. My guess is Safari is using a 64 bit time_t for its cookie implementations and Firefox is still using a 32 bit time_t on the same platform. Because its 30 years in the future, most stuff will not just be expired, but will also be completely unreadable in a legacy format. Just try reading that punchcard from 30 years ago on your Mac; it won't work. Likewise I expect the same 30 years in the future, your HTML page won't even be readable by current mind-reading cyborg robot computers. :-)
Try a date that isn't so far out. Maybe 1 year? 5 years? On Thu, Dec 18, 2008 at 10:27, sbarkdull <[email protected]> wrote: > > I have been using Cookies.setCookie() in my GWT app. The bad behavior > only happens on Firefox. On Safari, things work as expected. > > If I do this: > > Date IN_THE_FUTURE = new Date(); > IN_THE_FUTURE.setTime( IN_THE_FUTURE.getTime() + (1000L * 60L * 60L * > 24L * 365L * 20L) ); // 20 years in future > Cookies.setCookie( "name", "Bart Simpson", IN_THE_FUTURE, null, "/", > false ); > > Things seem to work properly. > Date IN_THE_FUTURE = new Date(); > IN_THE_FUTURE.setTime( IN_THE_FUTURE.getTime() + (1000L * 60L * 60L * > 24L * 365L * 500L) ); // 500 years in future > Cookies.setCookie( "name", "Bart Simpson", IN_THE_FUTURE, null, "/", > false ); > > The date seems to get set to a date in the early 20th century. > > Any idea what is wrong? > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
