Code example for Time

Methods: parse, parse3339, toMillis

0
      return body+"Error\n"+XmppError.decodeStanzaError(error).toString();
  } 
 
  public long getTimeStamp() { 
 
	  Time t = new Time();
 
      try { 
    	  //ISO8601/RFC3339 timestamp 
    	  t.parse3339( findNamespace("delay", "urn:xmpp:delay").getAttribute("stamp") );
          return t.toMillis(false);
           
      } catch (Exception e) { }
 
      try { 
		  //legacy timestamp 
		  t.parse( findNamespace("x", "jabber:x:delay").getAttribute("stamp") );
		  return t.toMillis(false);
		   
      } catch (Exception e) { }
       
      return System.currentTimeMillis();
  }