On 02/24/2012 12:32 PM, Mei Chan wrote: > But even without the conversion toDate(), the time still looks to be off > by an hour since 12 weeks later, we will be in daylight savings time > therefore the second value should of been an hour ahead, or am I missing > something here? > DateTime currentTime = new DateTime(System.currentTimeMillis()); > 2012-02-24T08:42:38.770-08:00 > currentTime.plusWeeks(12); > 2012-05-22T08:42:38.770-07:00
plusWeeks will try to avoid messing with the time fields if possible: it thinks in terms of calendar days. plusHours(12*7*24) may do what you expected. Mark -- Mark Carroll Software Engineer mark.carr...@vecna.com http://www.vecna.com/ Cambridge Research Laboratory Vecna Medical 36 Cambridge Park Drive Cambridge, MA 02140 Phone: (617) 864-0636 Fax: (617) 864-0638 Better Technology, Better World (TM) The contents of this message may be privileged and confidential. Therefore, if this message has been received in error, please delete it without reading it. Your receipt of this message is not intended to waive any applicable privilege. Please do not disseminate this message without the permission of the author. ------------------------------------------------------------------------------ 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