Android get running service machine/server datetime
<p>How to get the server date time.Android App is going access webservice.I want to know how to get the server time.Here I want to pass.Currently I did i got android time.....</p>

<pre><code> // ksoap2 calling wcf
public SoapPrimitive soapPrimitiveData(String tablename) throws IOException,XmlPullParserException {
    SoapPrimitive responsesData = null;
    SoapObject requestData = new SoapObject(NAMESPACE, METHOD_TABLEDATA); // set

    //This place I need to get server time.Here I did as normal way
    Date date = new Date();
    DateFormat formatter = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss");
    String strDate = formatter.format(date);

    requestData.addProperty("strBusinessUnit", strBusinessUnit);
    requestData.addProperty("strExecutive", strExecutive);
    requestData.addProperty("strTableName", tablename);
    requestData.addProperty("strDate", strDate);
    requestData.addProperty("strTerritoryCode", strTerritoryCode);


    SoapSerializationEnvelope envelopes = new SoapSerializationEnvelope(SoapEnvelope.VER11); // put all required data into a soap//// envelope
    envelopes.dotNet = true;
    envelopes.setOutputSoapObject(requestData);
    AndroidHttpTransport httpTransport = new AndroidHttpTransport(APPURL);
    httpTransport.debug = true;

    try {
        httpTransport.call(SOAP_ACTION1, envelopes);
        responsesData = (SoapPrimitive) envelopes.getResponse();

    } catch (SocketException ex) {
        ex.printStackTrace();
    } catch (Exception e) {
       e.printStackTrace();
    }
    return responsesData;
}
</code></pre>

<p>please help me ...</p>

<p>Thanks in advance....</p>
