Date: Wed, 8 May 1996 17:03:56 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: max@sfc.wide.ad.jp Cc: terry@lambert.org, freebsd-hackers@FreeBSD.org Subject: Re: date change and wtmp record Message-ID: <199605090003.RAA27307@phaeton.artisoft.com> In-Reply-To: <199605082318.IAA16019@mail.tky007.tth.expo96.ad.jp> from "Masafumi NAKANE/=?ISO-2022-JP?B?GyRCQ2Y6LDJtSjgbKEI=?=" at May 9, 96 08:18:11 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > Pipe the output to "hexdump" and see if you get "7b" ('{') or "7d"
> > ('}'). I'm still not satisfied that it isn't your font.
>
> Ok, here's the output:
>
> % last date | head -1
> date } Wed May 8 19:59 still logged in
> % last date |head -1 | od -h
> 0000000 6164 6574 2020 2020 2020 207d 2020 2020
> 0000020 2020 2020 2020 2020 2020 2020 2020 2020
> 0000040 2020 2020 6557 2064 614d 2079 3820 3120
> 0000060 3a39 3935 2020 7320 6974 6c6c 6c20 676f
> 0000100 6567 2064 6e69 000a
> 0000107
> %
>
> So, it really is '}'. At least `last' command sees it as '}' and
> so it shows 'still logged in' as someone pointed out earlier.
In line 220 of /src/bin/date/date.c:
/* set the time */
if (nflag || netsettime(tval)) {
logwtmp("|", "date", "");
tv.tv_sec = tval;
tv.tv_usec = 0;
if (settimeofday(&tv, (struct timezone *)NULL))
err(1, "settimeofday (timeval)");
******** logwtmp("{", "date", "");
}
It is clearly a '{'.
This assumes you are using the standard "date" command to set your date.
Check your date command dource code.
Terry Lambert
terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605090003.RAA27307>
