I am converting timestamp
to Solar Hijri
and good work like bellow :
private String getDate(long timestamp) {
Date date = new Date(timestamp * 1000L);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd/HH:mm", Locale.UK);
String[] paths = sdf.format(date).split("/");
CalendarTool ct = new CalendarTool(Integer.parseInt(paths[0]),
Integer.parseInt(paths[1]),
Integer.parseInt(paths[2]));
return ct.getIranianDate().trim() + " - " + paths[3].trim();
}
Problem: I get time base 24 hours but when I have 12:45 or 24:13 show me 00:45 and 00:13 always, but I need to 12:45 and 00:13.
I have problem with 12 and 00 .
For example my timestamp
is : 1515186060