diff --git a/src/elogd.c b/src/elogd.c index 9a5f9a98..b44e24ce 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.29 2003/02/26 21:03:28 midas + Fixed problem that entry date changed on upload + Revision 1.28 2003/02/26 08:17:22 midas Added 'attachment comment' @@ -4682,12 +4685,9 @@ time_t now; if (upload) { - /* get date */ - time(&now); - if (getcfg(lbs->name, "Date format", format)) - strftime(date, sizeof(str), format, localtime(&now)); - else - strcpy(date, ctime(&now)); + /* get date from parameter */ + if (*getparam("entry_date")) + strcpy(date, getparam("entry_date")); /* get attributes from parameters */ for (i=0 ; in_attr ; i++) @@ -4820,7 +4820,7 @@ time_t now; } /* subst attributes for edits */ - if (message_id && bedit) + if (message_id && bedit && !upload) { for (index = 0 ; index < lbs->n_attr ; index++) { @@ -4914,10 +4914,13 @@ time_t now; strftime(str, sizeof(str), format, localtime(&now)); else strcpy(str, ctime(&now)); + strcpy(date, ctime(&now)); + date[24] = 0; } rsprintf("%s:", loc("Entry date")); - rsprintf("%s\n", str); + rsprintf("%s\n", str); + rsprintf("\n", date); /* display attributes */ for (index = 0 ; index < lbs->n_attr ; index++)