Bug retrieving current time on Android with a given timezone
<p>In my application I retrieve from a webservice an unix timestamp (between 0 and 15minutes in the future) and I display a countdown to that time in the form of XXm-XXs.
So I simply do <code>System.currentTimeMillis() - timestamp</code> and I convert the result in a human readable date.
Everything works fine but it seems that with certain timezones, my timer is 30 minutes off, <s>because <code>System.currentTimeMillis()</code> return a value 1800000 millis lower than expected</s> because Calendar returns wrong value of minutes when I request minutes with it.
The timezone is the GMT+8 of Kuala Lumpur (Malasya). Using another GMT+8 timezone works normally.
Example:</p>

<pre><code> long till = requestTimeFromWebService()
 long now=System.currentTimeMillis();
 long remaining_time = till - now;
 Calendar c=Calendar.getInstance();
 c.setTimeInMillis(remaining_time);
 int minutes=c.get(Calendar.MINUTE);
 System.out.println(""+minutes+"m");
 int seconds=c.get(Calendar.SECOND);
 System.out.println(""+seconds+"s");
</code></pre>

<p>With this code <code>System.out.println(""+minutes+"m");</code> prints (e.g) <code>5m</code> if GMT+2 Rome Timezone is set and <code>35m</code> if GMT+8 Kuala Lumpur Timezone is set.</p>

<p>Is this a known bug?
I found this: <a href="http://www.objectdb.com/database/forum/363" rel="nofollow">http://www.objectdb.com/database/forum/363</a> that seems to confirm an issue.</p>

<p>I also found this: <a href="https://en.wikipedia.org/wiki/Time_in_Malaysia" rel="nofollow">https://en.wikipedia.org/wiki/Time_in_Malaysia</a></p>

<blockquote>
  <p>Blockquote At 2330 hrs local time of 31 December 1981, people in Peninsular Malaysia adjusted their clocks and watches ahead by 30 minutes to become 00:00 hours local time of 1 January 1982, to match the time in use in East Malaysia, which is UTC+08:00.
  This could explain where the bug comes off.</p>
</blockquote>

<p>Any advice?</p>