private String timestamp(){
  String timestamp=null;
  Calendar cal=Calendar.getInstance();
  DateFormat dfm=new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
  dfm.setTimeZone(TimeZone.getTimeZone("GMT"));
  timestamp=dfm.format(cal.getTime());
  return timestamp;
}

private String timestamp ( ) { String timestamp = null ; Calendar cal = Calendar . getInstance ( ) ; DateFormat dfm = new SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss'Z'" ) ; dfm . setTimeZone ( TimeZone . getTimeZone ( "GMT" ) ) ; timestamp = dfm . format ( cal . getTime ( ) ) ; return timestamp ; }
generate a iso - 8601 format timestamp as required by amazon .
