Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Re: Encode Date possible bug?



Permlink Replies: 3 - Last Post: Mar 26, 2016 5:12 AM Last Post By: acemary mary
Tom Brunberg

Posts: 329
Registered: 12/27/04
Re: Encode Date possible bug?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 17, 2015 7:43 AM
Eduardo Elias wrote:

I have created a small example to test this on another computer and for my
surprise it worked inside the same VM I was having trouble.

As you can see there is nothing special, just what should be. The value comes
out as 31/12/2014 23:59:59.

Now my question, how can it turn differently in my other project? It is a
big project, hundreds of units.

The results of floating points are overall suffering of rounding problems.

With this test means that my compiler is generating correct code, even in
FMX platform (same as my other project).

However my current project is taken from the Dev VM computer and run somewhere
else it works correcly.

So there is some correlation between PC-Project

Any ideas?

You did not say on what kind of hardware you are testing, but things that may affect the outcome
are among others:
- the FPU control word (see http://docwiki.embarcadero.com/Libraries/XE5/en/System.Set8087CW
- rounding mode see http://docwiki.embarcadero.com/Libraries/XE5/en/System.Math.SetRoundMode
- SSE round mode, see http://docwiki.embarcadero.com/Libraries/XE5/en/System.Math.SetSSERoundMode
All the referred pages have other links, worth reading.
Especially on x86 (with x87 fpu) I recall problems with 3rd party libraries changing the control
word to what they think is needed.

FWIW The result of your test routine on my W7 32 is the correct one 31/12/2014 23:59:59

--
Tom Brunberg
firstname.lastname@welho.com

John Herbster

Posts: 10
Registered: 12/1/99
Re: Encode Date possible bug?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 14, 2015 5:02 AM   in response to: Tom Brunberg in response to: Tom Brunberg
Tom Brunberg wrote:
Eduardo Elias wrote:
...
The results of floating points are overall suffering of rounding problems.
...> > Any ideas?

Tom and Eduardo,

You may appreciate my suggestions and insight on this problem that you can find with

https://www.google.com/search?q=dateutils+herbster+tdatetime

and in the QC report #56957, titled
"A Fix for DateUtils Date-Time Compare Functions",
with sources for a program which tests suggested fix to the DateUtils module. For the details, see
http://qc.embarcadero.com/wc/qcmain.aspx?d=56957

The qc report implies that it was fixed in 2010, in build 15.0.3730.28820. If any of you readers know what was changed or fixed, I will be thankful for any feedback.

--JohnH
(I haven't dropped in here very often. You may write me directly at herb-sci1 at sbcglobal dot net.)
John Herbster

Posts: 10
Registered: 12/1/99
Re: Encode Date possible bug?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 14, 2015 7:40 AM   in response to: Tom Brunberg in response to: Tom Brunberg
Tom Brunberg wrote:
Eduardo Elias wrote:
[...]

Tom and Eduardo,
You may also like to review Nick Hodges' blogs mentions of DateUtils and TTimeStamp:
http://blogs.embarcadero.com/nickhodges?s=DateUtils&search.x=0&search.y=0
and
http://blogs.embarcadero.com/nickhodges?s=TTimeStamp&search.x=1&search.y=5
--JohnH
acemary mary

Posts: 12
Registered: 2/23/16
Re: Encode Date possible bug?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 26, 2016 5:12 AM   in response to: Tom Brunberg in response to: Tom Brunberg
While using XviD-1.2.-127-25022006.exe from Koepie's site as a capture codec I've experienced a reproducable crash in VirtualDub.
That post should contain all of the relevant info, except I didn't mention that I used the default options for xvid.

Anyone have any ideas besides changing codecs? http://www.traininginsholinganallur.in/php-training-in-chennai.html | http://www.traininginsholinganallur.in/vmware-training-in-chennai.html | http://www.besanttechnologies.com/training-courses/cloud-computing-training/vmware-training-institute-in-chennai
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02