Re: DateTimeToTimeStamp returns incorrect values

Giganews Newsgroups
Subject: Re: DateTimeToTimeStamp returns incorrect values
Posted by:  Don (kingfi…@joesgarage.org)
Date: Sun, 26 Feb 2006

> DateTimeToTimeStamp seems to return incorrect values.
> First it calls Zero, which calls ZeroDate, which sets Year and Day to one
> rather than zero (very clever!).
> Then it calls AddYear and AddDay, yielding a year and day off by one.

Yes, these (and other) issues with the class were recently discussed on the
Indy developers newsgroup.

Based on comments in the source code, it would appear it's been broken for
quite some time.  And, as you've obviously noticed, the implementation is
flawed by design.  I would expect the implementation to be drastically
changed (at a minimum) or the class to be removed (if all else fails).

Replies

None

In response to

DateTimeToTimeStamp returns incorrect values posted by Jan Goyvaerts on Sun, 26 Feb 2006