When I parse some Dates (times) using simple date format, the code below gives me five hours more than the expected time. I'm parsing milliseconds to string. I'm parsing the duration of some Media files. For example, it gives 5 hour 10 minute when my media file is actually 10 minute long. What is the problem?
public static String formatTime(String time) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("H:mm:ss");
Date date = new Date(Long.parseLong(time));
return simpleDateFormat.format(date);