[GNC] Bad date not caught
Michael or Penny Novack
stepbystepfarm at comcast.net
Thu Oct 12 12:51:02 EDT 2023
On 10/12/2023 10:40 AM, Fred Tydeman wrote:
> In an account, I clicked on Duplicate of a transaction.
> I got a small popup with the date field highlighted.
> I typed in 5.19.21 (instead of the correct 5/19/21) and pressed enter.
> That got me the transaction duplicated, but with the
> date of 12/31/1969.
> Seems like the code should warn me about bad date.
LOL --- it did, sort of.
The problem is that you didn't know the special meaning of 12/31/1969
Now if the program had returned 00/00/0000 you would have understood
that you had a bad date. In other words, ZERO
By a convention adopted long ago, computers measure time in microseconds
since "time zero" which was chosen to be midnight, 12/31/69 (before Y2K
we tended to write years two digit if we meant in the 1900's). That
makes the "zero date" a VALID date (00/00/0000 would not be valid in a
field expecting a date)
Michael D Novack
More information about the gnucash-user
mailing list