i’m trying to retrieve the current date via unix time like this:
long unixTime = System.currentTimeMillis()/1000;
Date d = new Date(unixTime);
StringBuffer tmp = new StringBuffer();
tmp.append(d.getYear());
tmp.append(" - ");
tmp.append(d.getMonth());
tmp.append(" - ");
tmp.append(d.getDay());`
When i later print this out via tmp.getString() i get the following date 70 – 0 – 4 , is there something im missing ?
//Thx in advance
Those methods you are using are deprecated. You better use the
GregorianCalendarclass: