Parsing Java dates with truncated timezone information
问题 Consider the following date string 2012-10-01 01:02:03.004+0500 This is recognized in Java using the following SimpleDateFormat pattern: yyyy-MM-dd HH:mm:ss.SSSZ If, however, the timezone information above is truncated to 2 digits, i.e. like 2012-10-01 01:02:03.004+05 the date string does not comply to any valid format, so there is no SimpleDateFormat pattern that could be used in order to correctly parse it. Is there any workaround for parsing the truncated timezone correctly without string