Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IdDateTimeStamp gives strange result
#2
The SetFromTDateTime() method calls the Zero() method to initialize the TIdDateTimeStamp before adding the TDateTime.  However, Zero() sets the initial year and day values to 1, not 0.  Even the SetYear() and SetDay() methods force 0 to 1.  I do not know why.  I did not write TIdDateTimeStamp, I do not know the methodology behind it, but it was clearly intentional behavior, albeit it does seem wrong.

There is an existing ticket for this in Indy's issue tracker, I just haven't gotten around to fixing it yet:

#67: TIdDateTimeStamp.SetFromTDateTime is one year ahead

Reply


Messages In This Thread
RE: IdDateTimeStamp gives strange result - by rlebeau - 07-09-2019, 04:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)