Fixed display of locked datetime attributes

SVN revision: 2010
This commit is contained in:
Stefan Ritt 2008-01-29 07:07:26 +00:00
parent 58ae44fede
commit 8245a2b958

View File

@ -9893,6 +9893,19 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
else
my_strftime(str, sizeof(str), format, pts);
} else if (attr_flags[index] & AF_DATETIME) {
if (!getcfg(lbs->name, "Time format", format, sizeof(format)))
strcpy(format, DEFAULT_TIME_FORMAT);
ltime = atoi(attrib[index]);
pts = localtime(&ltime);
assert(pts);
if (ltime == 0)
strcpy(str, "-");
else
my_strftime(str, sizeof(str), format, pts);
} else
strlcpy(str, attrib[index], sizeof(str));