Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4719

Wrong time when parsing time without time zone information.

    XMLWordPrintableJSON

Details

    Description

      Functions public static Date convertToDate(String source) and public static Calendar convertToDateTime(String source) returns wrong time when parsing a data without timezone information.

      When parsing a time without timezone set, default timezone is used, But, daylight saving is always set to zero (instead of using the local default daylight savings also). This gives the wrong time back when the local daylight savings is not zero.

      The fix is to only set daylight savings to zero ( calendar.set(Calendar.DST_OFFSET, 0); ) when the time has time zone information.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rikard Rikard Swahn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified