[Git][NTPsec/ntpsec][master] Include full year in log timestamps. Addresses GitLab issue #474.
Eric S. Raymond
gitlab at mg.gitlab.com
Thu Mar 22 22:18:29 UTC 2018
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
17df0c11 by Eric S. Raymond at 2018-03-22T22:13:02Z
Include full year in log timestamps. Addresses GitLab issue #474.
- - - - -
2 changed files:
- NEWS
- libntp/msyslog.c
Changes:
=====================================
NEWS
=====================================
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,9 @@ on user-visible changes.
== Repository Head ==
+Log timestamps now include the year. This is useful when investigating bugs
+involving time-setting and -g.
+
== 2018-03-14: 1.1.0 ==
RIP Stephen William Hawking, CH CBE FRS FRSA. 1942-01-08 - 2018-03-14
=====================================
libntp/msyslog.c
=====================================
--- a/libntp/msyslog.c
+++ b/libntp/msyslog.c
@@ -136,8 +136,8 @@ humanlogtime(void)
tm->tm_hour, tm->tm_min, tm->tm_sec);
#else
/* ISO 8601 is a better format, sort order equals time order */
- snprintf(bp, LIB_BUFLENGTH, "%02d-%02dT%02d:%02d:%02d",
- tm->tm_mon+1, tm->tm_mday,
+ snprintf(bp, LIB_BUFLENGTH, "%04d-%02d-%02dT%02d:%02d:%02d",
+ tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec);
#endif /* ENABLE_CLASSIC_MODE */
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/17df0c11ef46cccca943a8901f4fc896617a5bad
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/17df0c11ef46cccca943a8901f4fc896617a5bad
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180322/a8ef7a11/attachment.html>
More information about the vc
mailing list