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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.9
    • None
    • adb
    • 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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: