Knowing that 1 second equals 1000miliseconds, 1minute equals 60seconds and 1hour equals 60minutes, why is 1000 a valid value for MSec but 60 is not a valid value for Sec and Min parameters?!
A while ago, TryEncodeTimeInterval used "(MSec<1000);" but the source code has been changed to "(MSec<=1000);".
TryEncodeTimeInterval(0,0,59,1000,Time) returns true while TryEncodeTimeInterval(0,0,60,0,Time) returns false.
If you're sure that there is no problem, so be it. It's just that, to me, it's not too obvious what the result of the function really means.
A while ago, TryEncodeTimeInterval used "(MSec<1000);" but the source code has been changed to "(MSec<=1000);".This was introduced intentionally by Michael in r48380 on Jan 24 ("Allow milliseconds up to 1000 milliseconds"), no idea why he did this. In my opinion this is wrong and you should file a bugreport.
A while ago, TryEncodeTimeInterval used "(MSec<1000);" but the source code has been changed to "(MSec<=1000);".This was introduced intentionally by Michael in r48380 on Jan 24 ("Allow milliseconds up to 1000 milliseconds"), no idea why he did this. In my opinion this is wrong and you should file a bugreport.
It was by choice and is related to this (https://bugs.freepascal.org/view.php?id=37849) bug report.Strange decision. A separate function should have been provided for this particular case rather than polluting a general purpose function. Waiting for next bugreport when somebody finds a case that minutes or seconds round to 60...
It was by choice and is related to this (https://bugs.freepascal.org/view.php?id=37849) bug report.Strange decision. A separate function should have been provided for this particular case rather than polluting a general purpose function. Waiting for next bugreport when somebody finds a case that minutes or seconds round to 60...