suggested addition to 'date'

Giorgos Keramidas keramida at
Sat Aug 12 20:35:16 UTC 2006

On 2006-08-12 13:08, Julian Elischer <julian at> wrote:
> Poul-Henning Kamp wrote:
> > Why would you need to include "the whole of 'date'" ?  Have you
> > never heard of strftime(3) ?
> Of course but I think it makes more sense to add the ability
> for date to be able to put the date onto a stream than to write
> a whole new program for it, and date does extra work not
> included in strftime() that it would be nice to have.
> It could be said that adding a strftime() to 'cat' as an option
> is equally possible but that would be much more disruptive than
> adding filterring to date, as cat is not line oriented,

Exactly.  Seeing that cat is not line-oriented I wrote at least
two different filters at various times, which were inspired by
the tinderbox log format.  The one was the Perl line-based one
which I posted upthread.

The other one was in plain C, and is attached.  It doesn't do the
fancy date-conversion stuff that date(1) can do, but please feel
free to rip it off if you find anything useful in there for the
date(1) patch.

> BTW. I agree that the last patch I gave was overly complicated
> and a much simpler one is possible.. Basically, Giorgos's
> suggested patch is pretty close to being right.

Or we can adapt this until it is right ;-)

More information about the freebsd-current mailing list