Code example for DateFormat

Methods: setTimeZone

0
  static { 
    DATE_FORMAT = new SimpleDateFormat("yyyyMMdd");
    // For dates without a time, for purposes of interacting with Android, the resulting timestamp 
    // needs to be midnight of that day in GMT. See: 
    // http://code.google.com/p/android/issues/detail?id=8330 
    DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT"));
  } 
  private static final DateFormat DATE_TIME_FORMAT = new SimpleDateFormat("yyyyMMdd'T'HHmmss");
 
  private static final String GOOGLE_SHOPPER_PACKAGE = "com.google.android.apps.shopper";
  private static final String GOOGLE_SHOPPER_ACTIVITY = GOOGLE_SHOPPER_PACKAGE +
      ".results.SearchResultsActivity"; 
  private static final String MARKET_URI_PREFIX = "market://search?q=pname:";
  private static final String MARKET_REFERRER_SUFFIX =
      "&referrer=utm_source%3Dbarcodescanner%26utm_medium%3Dapps%26utm_campaign%3Dscan"; 
 
  public static final int MAX_BUTTON_COUNT = 4;
 
  private final ParsedResult result;
  private final Activity activity;
  private final Result rawResult;