Looking for a tool to make UNIX-Time

John F. Haugh II jfh at rpp386.cactus.org
Fri Nov 30 11:56:24 AEST 1990


In article <1990Nov28.065101.13081 at zorch.SF-Bay.ORG> xanthian at zorch.SF-Bay.ORG (Kent Paul Dolan) writes:
>Yep, that's our John Haugh.  Any wonder, with coding habits like that,
>that he needs and is promoting the return of comp.unix.wizards, so he
>can have an audience unskilled enough to think of him as a real programmer?

Oh great, K*nt Paul Dolan.  Official net.mental-case.  K*nt, haven't
you had enough?  =I= admit my code has bugs.  Can you make the
same claims?  I don't know - frankly I never see code with your
name on it.

Okay, since K*nt cares so much, let's see what kind of interesting
bugs there might be in the program which Boyd Roberts posted the
other day.  The advantage to admitting you have bugs in your code
is that when some idiot like me comes along and points them out
you get to say "Gee, Thanks" instead of eating crow because you
pretended to write bug free code or pretending the problem isn't
really a bug.

Let's suppose for a moment that you are running your program in
the central time zone.  Let's suppose for a moment that you are
running it on October 28th around 1:51 am.  Let's suppose for a
moment that you are running it for every second of that fateful
minute.

What you will see is that 10/28/90 01:51:44 returns 657,096,704
seconds and that 10/28/90 01:51:45 returns 657,100,305, which is
hardly one second more.  It is, in fact 3601 seconds more, which
means that according to Boyd Roberts daylight savings time starts
at 1:51:45, and not 1:00 or 2:00 or whatever.

You have to understand the algorithm to understand the source of
the error.  The first time is 0x272A8000.  When the next second
rolls around, it just so happens that 0x272A8001 =doesn't= get
picked because there are =two= 1:51:45's and Boyd picks the
second one because 0x272AC000 is too large, and so is every
choice all the way to 0x272A8800, by which time he has already
skipped over (in counting order, that is) 0x272A8001.  Once his
algorithm decides that 0x272A8800 is too small, he is forced to
pick the second occurance of that time by setting more of the
bits off to the right.

>The scary thing is that he earns his living as a coding consultant, when
>he's not busy libeling people on the net or making a fool of himself all
>over the place.

No, K*nt, I make my living as a programmer.  Unlike you who makes
his living dodging the child support payments you are supposed to
be paying to your ex-wife, or pretending to be mentally ill.  You
may be mentally ill, for all I know, but I've never seen anyone
as "disabled" as you are "able" to produce so much crap.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh at rpp386.cactus.org
"SCCS, the source motel!  Programs check in and never check out!"
		-- Ken Thompson



More information about the Alt.sources.d mailing list