I would like the time respresented as this “Thu Jan 01 08:40:38 GMT+01:00 1754”
so i did this :
Date datu = new Date();
datu.setYear(1754);
datu.setMonth(0);
datu.setDate(1);
DateFormat.format("%tc", datu);
// DATU = Thu Jan 01 08:40:38 GMT+01:00 3654
String startTime = datu.toGMTString();
now the problem is that i set the year on 1754 in the code. but as I print it out. there is 3654 ?
EDIT:
datu.setYear(1754-1900) can do the trick. but isn’t there another way?
Please try like this :
Output