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

ConverterUtil.convertToDate(String source) sets DST_OFFSET to 0 even with no timezone present

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.9
    • Fix Version/s: None
    • Component/s: adb
    • Labels:
      None

      Description

      This simple example demonstrates the issue:

       

      import org.apache.axis2.databinding.utils.ConverterUtil;
      
      
      public class Axis2ConverterUtil {
      	public static void main(String[] args) {
      		System.out.println(ConverterUtil.convertToDate("2019-08-01"));
      		System.out.println(ConverterUtil.convertToDate("2019-12-01"));		
      	}
      }
      

      For me with a default locale of CET (or CEST at the moment) it outputs this:

      Thu Aug 01 01:00:00 CEST 2019
      Sun Dec 01 00:00:00 CET 2019
      

      The time on the dates are 1 hour off due to setting DST_OFFSET to 0.

      Same kind of issue as AXIS2-4719 and AXIS2-5324

        Attachments

        1. axis2-1.8.AXIS2-5969.patch
          0.8 kB
          Mikkel Hansen

          Activity

            People

            • Assignee:
              robertlazarski Robert Lazarski
              Reporter:
              Hillerøe Silwing
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: