return the time - always in the form of
YYMMDDhhmmssGMT(+hh:mm|-hh:mm).
Normally in a certificate we would expect "Z" rather than "GMT",
however adding the "GMT" means we can just use:
dateF = new SimpleDateFormat("yyMMddHHmmssz");
To read in the time and get a date which is compatible with our local
time zone.
Note: In some cases, due to the local date processing, this
may lead to unexpected results. If you want to stick the normal
convention of 1950 to 2049 use the getAdjustedTime() method.
//
// standardise the format.
//
if (time.length() == 11)
{
return time.substring(0, 10) + "00GMT+00:00";
}
else if (time.length() == 13)
{
return time.substring(0, 12) + "GMT+00:00";
}
else if (time.length() == 17)
{
return time.substring(0, 12) + "GMT" + time.substring(12, 15) + ":" + time.substring(15, 17);
}
return time;