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.