> I'm having trouble converting a LocalDateTime object to a > java.sql.Timestamp due to what seems to be daylight savings time. > > If I create my LocateDateTime as: > LocalDateTime localDateTime = new LocalDateTime( 2007, 03, 13, 12, 00, > 00 ); > everything seems fine. localDateTime.toString() shows up as > "2007-03-13T12:00:00.000" > > > But now when I want to convert to a Timestamp, I'm not sure what to do at > this point. I've tried the following: > Timestamp timestamp = new Timestamp( > localDateTime.toDateTime().toDate().getTime() ); > > However, when I check the value of the timestamp, timestamp.toString() > shows up as "2007-03-13 11:00:00.0". >
After spending countless hours trying to figure this out, I realized that JRE 1.5_b05 was to blame. Upgrading to Build 08 or Build 09 has fixed the issue. Hopefully this will help others in the same predicamment. Eric ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Joda-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/joda-interest
