mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
Make newsyslog(8) print the correct date when the logs are turned over.
PR: 46395 Submitted by: maxim MFC: eventually
This commit is contained in:
parent
81781ca042
commit
35c45e664a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108164
@ -102,7 +102,7 @@ time_t timenow;
|
||||
#define MIN_PID 5
|
||||
#define MAX_PID 99999 /* was lower, see /usr/include/sys/proc.h */
|
||||
char hostname[MAXHOSTNAMELEN]; /* hostname */
|
||||
char *daytime; /* timenow in human readable form */
|
||||
char daytime[16]; /* timenow in human readable form */
|
||||
|
||||
static struct conf_entry *parse_file(char **files);
|
||||
static char *sob(char *p);
|
||||
@ -238,7 +238,7 @@ PRS(int argc, char **argv)
|
||||
char *p;
|
||||
|
||||
timenow = time((time_t *) 0);
|
||||
daytime = ctime(&timenow) + 4;
|
||||
(void)strncpy(daytime, ctime(&timenow) + 4, 15);
|
||||
daytime[15] = '\0';
|
||||
|
||||
/* Let's get our hostname */
|
||||
|
Loading…
Reference in New Issue
Block a user