I Want to get right time on Android Device, what I do for Expression like 1 * new Date(); in Javascript same in Android?
<p>If I run this in browser; </p>

<pre><code>1 * new Date();
</code></pre>

<p>I get the time: <code>1369837120265</code>. I want to get same in my Android app.</p>

<p>Because Android connects to the internet, is there any guarantee that the time I get will be right? Is there any API to do this? How can I get the same time from Android?</p>

<p>My app is Java based, and I want to evaluate the time like how I evaluate in browser using JavaScript. </p>

<p>Thanks</p>

<p>@Djon</p>

<p>I want to know a thing more in my question.</p>

<p>As in question if device use internet and it is connect then it will work fine. </p>

<p>What about last time When My tablet is offline and have set wrong time. If wrong time happen more time and user not have correct it then.</p>

<ol>
<li><p>in Case of Phablet (SIM based tablet) Is their Any way to get time. I am not sure but My nokia &amp; samesung phone take time from The Call service provider.</p></li>
<li><p>Because the tablet I own not have SIM nor connect to internet. Now is their anyway to get correct time without bother user to change the time correctly.</p></li>
</ol>

<p>I means in 2nd case offline app. (just for example) is this possible to get right time.</p>
