Closed casolorz closed 9 years ago
The code below on DLNAService works fine except for 12 hours of video. It considers 12 to be zero because hh is used instead of HH.
private long convertStrTimeFormatToLong(String strTime) { long time = 0; SimpleDateFormat df = new SimpleDateFormat("hh:mm:ss"); try { Date d = df.parse(strTime); Date d2 = df.parse("00:00:00"); time = d.getTime() - d2.getTime(); } catch (ParseException e) { // e.printStackTrace(); Log.w("Connect SDK", "Invalid Time Format: " + strTime); return 0; } return time; }
Thanks. It was fixed here https://github.com/ConnectSDK/Connect-SDK-Android-Core/commit/d52ac44291d954dcf30f1bb19f5edef72b6edb78
The code below on DLNAService works fine except for 12 hours of video. It considers 12 to be zero because hh is used instead of HH.