Implemented "Date/Time format <attribute> = ..."
This commit is contained in:
@@ -599,6 +599,10 @@ Admin user = bill
|
||||
%H:%M</b> yields in a display of <b>Thursday, November 15, 2001,
|
||||
12:35</b> for example.
|
||||
</li>
|
||||
<li>
|
||||
<b><code>Time format <attribute> = <string></code></b><br>
|
||||
Same, but just for an individual attribute.
|
||||
</li>
|
||||
<li>
|
||||
<b><code>Date format = <string></code></b><br>
|
||||
This option determines how the date is displayed from attributes which
|
||||
@@ -607,6 +611,10 @@ Admin user = bill
|
||||
%Y</b> yields in a display of <b>Thursday, November 15, 2001</b> for
|
||||
example.
|
||||
</li>
|
||||
<li>
|
||||
<b><code>Date format <attribute> = <string></code></b><br>
|
||||
Same, but just for an individual attribute.
|
||||
</li>
|
||||
<li>
|
||||
<b><code>Welcome Page = <file></code></b><br>
|
||||
By default, the list with the last twenty entries of a logbook is
|
||||
|
||||
+17
-7
@@ -8711,7 +8711,10 @@ int build_subst_list(LOGBOOK * lbs, char list[][NAME_LENGTH], char value[][NAME_
|
||||
t = (time_t) atoi(attrib[i]);
|
||||
ts = localtime(&t);
|
||||
assert(ts);
|
||||
if (!getcfg(lbs->name, "Date format", format, sizeof(format)))
|
||||
|
||||
sprintf(str, "Date format %s", attr_list[i]);
|
||||
if (!getcfg(lbs->name, str, format, sizeof(format)))
|
||||
if (!getcfg(lbs->name, "Date format", format, sizeof(format)))
|
||||
strcpy(format, DEFAULT_DATE_FORMAT);
|
||||
|
||||
my_strftime(value[i], NAME_LENGTH, format, ts);
|
||||
@@ -8721,8 +8724,11 @@ int build_subst_list(LOGBOOK * lbs, char list[][NAME_LENGTH], char value[][NAME_
|
||||
t = (time_t) atoi(attrib[i]);
|
||||
ts = localtime(&t);
|
||||
assert(ts);
|
||||
if (!getcfg(lbs->name, "Time format", format, sizeof(format)))
|
||||
strcpy(format, DEFAULT_TIME_FORMAT);
|
||||
|
||||
sprintf(str, "Time format %s", attr_list[i]);
|
||||
if (!getcfg(lbs->name, str, format, sizeof(format)))
|
||||
if (!getcfg(lbs->name, "Time format", format, sizeof(format)))
|
||||
strcpy(format, DEFAULT_TIME_FORMAT);
|
||||
|
||||
my_strftime(value[i], NAME_LENGTH, format, ts);
|
||||
|
||||
@@ -24821,8 +24827,10 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
|
||||
rsprintf("</td>\n");
|
||||
} else if (attr_flags[i] & AF_DATE) {
|
||||
|
||||
if (!getcfg(lbs->name, "Date format", format, sizeof(format)))
|
||||
strcpy(format, DEFAULT_DATE_FORMAT);
|
||||
sprintf(str, "Date format %s", attr_list[i]);
|
||||
if (!getcfg(lbs->name, str, format, sizeof(format)))
|
||||
if (!getcfg(lbs->name, "Date format", format, sizeof(format)))
|
||||
strcpy(format, DEFAULT_DATE_FORMAT);
|
||||
|
||||
ltime = atoi(attrib[i]);
|
||||
pts = localtime(<ime);
|
||||
@@ -24836,8 +24844,10 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
|
||||
|
||||
} else if (attr_flags[i] & AF_DATETIME) {
|
||||
|
||||
if (!getcfg(lbs->name, "Time format", format, sizeof(format)))
|
||||
strcpy(format, DEFAULT_TIME_FORMAT);
|
||||
sprintf(str, "Time format %s", attr_list[i]);
|
||||
if (!getcfg(lbs->name, str, format, sizeof(format)))
|
||||
if (!getcfg(lbs->name, "Time format", format, sizeof(format)))
|
||||
strcpy(format, DEFAULT_TIME_FORMAT);
|
||||
|
||||
ltime = atoi(attrib[i]);
|
||||
pts = localtime(<ime);
|
||||
|
||||
Reference in New Issue
Block a user