1

I have google it, but dont find what is the problem in this code.

private Date ConvertToDate(String dateString){

    SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm");

    Date convertedDate;
    try {
        convertedDate = dateFormat.parse(dateString);

    } catch (ParseException e) {
        e.printStackTrace();
        return null;
    }

    return convertedDate;

}

If GMT is -1, then return the correct hour, example hour=23 , but if GMT+1, then returns hour=0 when should be hour=1. Don't understand why.....any help on this ? Thanks

kaiz.net
  • 1,984
  • 3
  • 23
  • 31
user1251064
  • 35
  • 10

0 Answers0