On Tue, 11/24/2026 1:41 AM, Lawrence D’Oliveiro wrote:
> On Tue, 24 Nov 2026 01:39:06 -0500, Paul wrote:
>
>> The time it prints out, is correct twice a day.
>
> Doesn’t it even know the difference between AM and PM ... ?
>
No.
It's a joke program, showing what AI are capable of.
The AI did actually catch on to the joke, the details
of the time keeping deficiency. To detect the question,
it looks for any occurrence of "WHAT" "TIME" "IS" "IT"
on the concatenation of all arguments on the command line.
The words could appear in any order, would trigger
a report of the time. And there is no call to any local
time keeping process. It's just a fixed printf with
the same time reported all the time.
I made this program, as a tip of the hat to the
XKCD random number generator... which always returns "4" :-)
https://xkcd.com/221/
int getRandomNumber()
{
return 4; // chosen by fair dice roll.
// guaranteed to be random.
}
Paul