1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 06:45:43 +02:00

[317541] Show blank as the last modified for a file with no last modified

This commit is contained in:
David McKnight 2010-08-19 16:42:54 +00:00
parent 26f5e9826b
commit 50d74e5d86

View file

@ -1293,18 +1293,20 @@ public class SystemViewRemoteFileAdapter
if (date != null) if (date != null)
{ {
long t = date.getTime(); long t = date.getTime();
if (t == 0){
// no time available, we should leave this blank
return "";
}
if (formatted) if (formatted)
{ {
if (t == 0){
// no time available, we should leave this blank
return ""; //$NON-NLS-1$
}
else {
ULocale locale = ULocale.getDefault(); ULocale locale = ULocale.getDefault();
DateFormat icufmt = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM, locale); DateFormat icufmt = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM, locale);
String formattedDate = icufmt.format(date); String formattedDate = icufmt.format(date);
return formattedDate; return formattedDate;
} }
}
else else
{ {
return date; return date;