jca_at_wxcvbn.org (Jérémie Courrèges-Anglas) writes:
> Mike Jackson <mj_at_netauth.com> writes:
>
>> Hi,
>
> Hi,
>
>> I’ve just setup a new OpenBSD 5.5 (snapshot) machine and noticed that svlogd logs all timestamps as such:
>>
>> 1900-01-00_00:00:00.95511
>>
>> where the seconds never increment, only the 95511 portion will roll over and start back from zero, thus making svlogd’s timestamps useless. I’m running svlogd like this:
>>
>> exec chpst -u svlog svlogd -tt ntp
>>
>>
>> I’m guessing that the problem might be related to the new implementation of time_t in OpenBSD:
>
> [...]
>
> Probably.
>
> Questions:
> - what architecture do you run, a 32 bits one?
> - does this patch fix the problem? (blind guess)
You funny ezmlm, where have you hidden my patch?
This is not a blind guess anymore, please confirm that it fix your
problem.
--- src/fmt_ptime.c.orig Tue Nov 21 16:14:12 2006
+++ src/fmt_ptime.c Tue Apr 22 01:27:37 2014
_at_@ -4,7 +4,7 @@
unsigned int fmt_ptime2(char *s, struct taia *ta, char sep) {
struct tm *t;
- unsigned long u;
+ time_t u;
if (ta->sec.x < 4611686018427387914ULL) return(0); /* impossible? */
u =ta->sec.x -4611686018427387914ULL;
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
Received on Mon Apr 21 2014 - 23:52:44 UTC