Thoughts from Dan Miser RSS 2.0
 Friday, December 16, 2005
There is an internal QC report that I created (21701) that deals with this issue. D2006 changed the behavior of TryEncodeDateTime (which is used by RecodeTime) so that it may return negative values when you don't expect it to. For example, a call like this returns a negative value: aDate := RecodeTime(0, 12, 0, 0, 0);

A snippet from the D2006 TryEncodeDateTime method looks like this:


  Result := TryEncodeDate(AYear, AMonth, ADay, AValue);
  if Result then
  begin
    Result := TryEncodeTime(AHour, AMinute, ASecond, AMilliSecond, LTime);
    if Result then
      if AValue > 0 then
        AValue := AValue + LTime
      else
        AValue := AValue - LTime

I copied the methods I needed from DateUtils and made local copies and changed them to revert back to the code in D6. However, one person commented that performing the check, "if AValue >=0 then" would also work. Hopefully this gets fixed in Update 2.

Friday, December 16, 2005 9:15:00 AM (Central Standard Time, UTC-06:00)  #    Comments [2] -

Tracked by:
http://9ng-information.info/30465174/index.html [Pingback]
http://9nr-information.info/85665448/index.html [Pingback]
http://9nl-information.info/48529744/index.html [Pingback]
http://9nx-information.info/39442041/index.html [Pingback]
http://9nq-information.info/76192557/index.html [Pingback]
http://9nr-information.info/70459737/index.html [Pingback]
http://9nk-information.info/95417248/index.html [Pingback]
http://9nn-information.info/42770437/index.html [Pingback]
http://9ni-information.info/44873134/index.html [Pingback]
http://9nu-information.info/50765953/index.html [Pingback]
http://9nk-information.info/94479830/index.html [Pingback]
http://9qn-information.info/96616946/attrezzatura-usata-bar-ristorante.html [Pingback]
http://9qf-information.info/36899623/staffa-navman.html [Pingback]
http://9op-information.info/18005062/index.html [Pingback]
http://9os-information.info/31888119/index.html [Pingback]
http://9ob-information.info/73087187/kansas-city-missouri-lottery.html [Pingback]
http://9oq-information.info/31691039/index.html [Pingback]
http://9oy-information.info/21869210/custom-duty-and-foreign-business.html [Pingback]
http://9qe-information.info/36272377/giurisdizione-scolastica-alunni-maggiorenni... [Pingback]
http://9qt-information.info/87561801/index.html [Pingback]
http://9of-information.info/18766609/index.html [Pingback]
http://9re-information.info/79435121/glass-for-furniture.html [Pingback]
http://9rf-information.info/68779609/index.html [Pingback]
http://9st-information.info/01480825/jing-jin.html [Pingback]
http://9rb-information.info/73803731/index.html [Pingback]
http://9rs-information.info/91476505/future-tv-lebanon-superstar-show.html [Pingback]
http://9sg-information.info/32293902/revisione-compressore-climatizzatore-auto.h... [Pingback]
http://9ro-information.info/48957658/north-ariz-real-estate.html [Pingback]
http://9sm-information.info/23898705/index.html [Pingback]
http://9uaff-le-informazioni.info/95797077/paul-collins.html [Pingback]
http://9uaeq-le-informazioni.info/41756598/index.html [Pingback]
http://9uaei-le-informazioni.info/76008517/bpubanca-it.html [Pingback]
http://9uafi-le-informazioni.info/81997319/frequency-and-tens-therapy.html [Pingback]
http://9uaet-le-informazioni.info/56220608/linguaggio-di-programmazione-pascal.h... [Pingback]
http://9uafa-le-informazioni.info/80627036/index.html [Pingback]
http://9uafj-le-informazioni.info/93157725/index.html [Pingback]
http://9uafb-le-informazioni.info/75050444/fiat-panda-cross.html [Pingback]
http://9uagh-le-informazioni.info/96336702/centro-commerciale-panorama.html [Pingback]
http://9uago-le-informazioni.info/04670905/occhio-rosso-it.html [Pingback]
http://9uahs-le-informazioni.info/15427672/index.html [Pingback]
http://9uagf-le-informazioni.info/60617942/visualizzazione-file-icona.html [Pingback]
http://9uahe-le-informazioni.info/92129424/tribunale-di-benevento-it.html [Pingback]
http://9uahb-le-informazioni.info/37308971/index.html [Pingback]
http://9uagk-le-informazioni.info/93276815/index.html [Pingback]
http://9uaht-le-informazioni.info/38612182/index.html [Pingback]
http://9uahs-le-informazioni.info/65576927/index.html [Pingback]
http://9uaho-le-informazioni.info/56073547/index.html [Pingback]
Friday, December 16, 2005 11:18:00 AM (Central Standard Time, UTC-06:00)
Has anyone checked to see if this TryEncodeDate is referenced by the Indy 10 code?
Captain Jake
Monday, December 19, 2005 8:38:00 AM (Central Standard Time, UTC-06:00)
Also, see my newsgroup posts about the UTC offset error in the version of Indy that ships with D2006.
Captain Jake
Comments are closed.
Navigation
Archive
<November 2008>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Dan Miser
Sign In
Statistics
Total Posts: 310
This Year: 25
This Month: 0
This Week: 0
Comments: 605
All Content © 2008, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)