Sunday, December 4, 2011

Convert DateTime SQLite to GMT DateTime SQLite


static public String convertDateTimeToGMT(String in)
{
String out = in;

SimpleDateFormat sdf = new SimpleDateFormat(Utility.getDBDateFormat());
Date iDate = null;
try {
iDate = sdf.parse(in);
} catch (ParseException e) {
Log.e(TAG, e.getMessage());
return in;
}

long newd = iDate.getTime() - sdf.getTimeZone().getRawOffset();
SimpleDateFormat osdf = new SimpleDateFormat(Utility.getDBDateFormat());
out = osdf.format(new Date(newd));

return out;
}

[ROM] Samsung S7 Stock Firmware BRI (Taiwan台灣)

Latest ROM: G930FXXU1DQEU Download: https://kfhost.net/tpl/firmwares.php?record=B7E6DE774E3811E7963AFA163EE8F90B Reference: http://...