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;
}
Sunday, December 4, 2011
Convert DateTime SQLite to GMT DateTime SQLite
Subscribe to:
Posts (Atom)
[ROM] Samsung S7 Stock Firmware BRI (Taiwan台灣)
Latest ROM: G930FXXU1DQEU Download: https://kfhost.net/tpl/firmwares.php?record=B7E6DE774E3811E7963AFA163EE8F90B Reference: http://...
-
In Android 4.1 (API 16) and above, MediaCodec is introduced by Android. By using MediaCodec, we can easily decode video without using Androi...
-
#include <sstream> #include <assert.h> // include in android platform-9 or newer #include <android/asset_manager.h> #inclu...
-
Latest ROM: G930FXXU1DQEU Download: https://kfhost.net/tpl/firmwares.php?record=B7E6DE774E3811E7963AFA163EE8F90B Reference: http://...