You are using hourOfDay, instead of hourOfMinute, thus wiping out the
correct hour.
Stephen

On 5 April 2011 22:37, Aaron Baff <aaron.b...@telescope.tv> wrote:
> I’m having an issue trying to get a Partial.toDateTime() to convert to the
> correct DateTime. The Partial is [year=2011, monthOfYear=4, dayOfMonth=2,
> hourOfDay=8, minuteOfDay=0, secondOfMinute=14], and I’m converting it using
> var1.toDateTime(new DateTime(useZone).withMillisOfSecond(0));   The useZone
> is DateTimeZone.forID(“America/New_York”). It keeps giving me 1301716814000
> millis which is 12:00:14-04:00, but it should be 08:00:14-04:00
> (1301745614000 millis). It looks like it’s subtracting 4 hours from the
> Partial, then subtracts another 4 when applying the timezone.
>
>
>
> Am I doing the toDateTime() wrong? Am I creating the baseInstance wrong
> somehow? Should I just iterate through the Partial’s fields and set a
> DateTime instances fields based on that instead?
>
>
>
> --Aaron
>
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
>

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to