Note that there are some explanatory texts on larger screens.

plurals
  1. PO.NET AddDays issue
    primarykey
    data
    text
    <p>The next 2 lines adds the same amount to the same date, and the results date part is the same, but somehow the there's difference in the time part!</p> <pre><code>(new DateTime(2000,1,3,18,0,0)).AddDays(4535); (new DateTime(2000,1,3,18,0,0)).AddMonths(149); </code></pre> <p>you'll get a difference of 15 secs, and with both are at least roundable to days, I don't know why this happend, but it happens only with AddDays, but not AddMonths (even with thousands of months added)</p> <hr> <p><strong>Edit 1</strong></p> <p>So I've tried to make a sample project, but no luck. If I run my main project, and put the sample lines into the watches, than I get 2 separate values, if I make a fresh start, the problem is not there. The project is 3.5, c#, vs2010, win7hp x64 (proj: x86). I'm trying to reproduce it also in a fresh small project, I'll be writing back if I have it.</p> <p>These are my results in the main project (copeid from watches!):</p> <pre><code>(new DateTime(2000, 1, 3, 18, 0, 0)).AddDays(4535).Ticks 634743432153600000 long (new DateTime(2000, 1, 3, 18, 0, 0)).AddMonths(149).Ticks 634743432000000000 long </code></pre> <hr> <p><strong>Edit 2</strong></p> <p>I've managed to narrow it down even more. We have a self-made component, panel base, we draw on it with directx. If I make that visible=false, than visible=true, than the error comes, before the visible=true (or show()), the calculation is correct. What in the world can be there, that the result gets something else of a formula where no variable is used. Culture is not affected in the component..</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload