#116 TimeZone not copied when mapping Calendar

closed
None
5
2007-12-16
2007-10-17
No

The current CalendarConverter does not copy the TimeZone when mapping a Calendar object. The new object is valid, but the underlying TimeZone will be changed to the local machine TimeZone.

Current code:
// Convert from Calendar to Calendar
else if (Calendar.class.isAssignableFrom(srcFieldClass)) {
Calendar c = (Calendar) srcObj;
result.setTime(c.getTime());
}

Should be:

// Convert from Calendar to Calendar
else if (Calendar.class.isAssignableFrom(srcFieldClass)) {
Calendar c = (Calendar) srcObj;
result.setTime(c.getTime());
result.setTimeZone(c.getTimeZone());
}

Discussion

  • Franz Garsombke

    Franz Garsombke - 2007-10-18
    • assigned_to: nobody --> fgarsombke
     
  • Franz Garsombke

    Franz Garsombke - 2007-10-18

    Logged In: YES
    user_id=550744
    Originator: NO

    Fixed in current_release branch will got out in next release. Thanks for the find!

    Franz

     
  • Franz Garsombke

    Franz Garsombke - 2007-10-18
    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 45 days (the time period specified by
    the administrator of this Tracker).

     
  • Franz Garsombke

    Franz Garsombke - 2007-12-03
    • status: closed --> pending
     
  • Matt Tierney

    Matt Tierney - 2007-12-16
    • status: pending --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks