[news.software.b] getdate

dave@lsuc.uucp (David Sherman) (04/28/88)

We have getdate(3) installed in libc.a and use it for various
applications beyond netnews.  According to getdate.y, it's
version 2.16, 9/24/87.

I just discovered that it is WRONG when parsing ctime(3) output.

If you feed "Wed Apr 27 12:09:03 1988" to getdate, it interprets
it as a number that, when output through ctime(3), produces:
"Tue Apr 26 11:41:03 1988".

I've reverted to an older getdate I had lying around, version 2.5
(Bellovin 3/3/83), and it works fine.  But the new one has some
enhancements I like.  Does anyone know what the problem is?
This machine is a Perkin-Elmer 3220 running v7, by the way.

David Sherman
The Law Society of Upper Canada
-- 
{ uunet!mnetor  pyramid!utai  decvax!utcsri  ihnp4!utzoo } !lsuc!dave

news@becker.UUCP (UseNet News) (06/05/91)

In System V Release 4.0, at least for the Amiga version
"/usr/include/time.h" contains a declaration for "getdate()"
which is a normal part of the library as far as I can tell.

Of course it returns a "struct tm", has different args,
etc. The real problem is that "time.h" is included in the
source for "getdate.y", which then gives a compile-time
error about redeclaration of getdate, sigh

I'm sure there's a magic bullet, please somebobdy tell me
there is one and what it is...

Thanks,
-- 
Bruce Becker	Toronto, Ont.
Internet: news@becker.UUCP	UUCP: ...!utai!mnetor!becker!news
"'Comefrom' considered useful" - the Anti-Dijkstra