I'm getting a long from a server that I have to parse into a date. I'm using a calendar to do so.
Thing is that the long came transformed from the server (it have the user local time), but I get it as a default GMT and I also transform it into local time.
So, it transforms twice. Since I get it right, how can I show it without changing it to local (seems to do it by default)? My code:
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
calendar.setTimeInMillis(dateLong);
SimpleDateFormat format1 = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
format1.format(cal.getTime());