bugGNUstep - Bugs: bug #41557, -[NSCalendarDate...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #41557: -[NSCalendarDate descriptionWithCalendarFormat:locale:] emits incorrect milliseconds

Submitted by:  Larry Campbell <lcampbel>
Submitted on:  Tue 11 Feb 2014 11:39:35 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu 13 Feb 2014 12:31:54 PM UTC, comment #2:

Thanks very much … I applied that patch to svn trunk.

Richard Frith-Macdonald <CaS>
Project Member
Wed 12 Feb 2014 12:03:35 AM UTC, comment #1:

I've attached the patch, and a unit test I use that includes, among other things, a test for this bug (as well as a regression test for related bug #16426). The test function of interest is called cr2096767 (that's our internal bug number).

Larry Campbell <lcampbel>
Tue 11 Feb 2014 11:39:35 PM UTC, original submission:

The initial symptom we noticed was that NSLog sometimes prints a milliseconds value of 1000:

2013-02-04 21:21:18.999 authdnsconfigloader[28224] smschaef.com: disappeared from ASAP, and its deletion is permitted, so it's been marked for deletion
2013-02-04 21:21:18.1000 authdnsconfigloader[28224] homesite.com.au: disappeared from ASAP, and its deletion is permitted, so it's been marked for deletion
2013-02-04 21:21:19.056 authdnsconfigloader[28224] ksolo.com: disappeared from ASAP, and its deletion is permitted, so it's been marked for deletion

This was because of various rounding bugs in NSCalendarDate. I wrote a pretty detailed unit test, and discovered that Mac OS X's behavior in this area was slightly mysterious, too; my fix exactly replicates Mac OS X's behavior (and fixes the 1000-millisecond bug).

Patch and unit test will be attached shortly. The patch is relative to gnustep-base 1.24.0.

Larry Campbell <lcampbel>

 

Attached Files
file #30518:  NSCalendarDate.m.patch added by lcampbel (2kB - application/octet-stream)
file #30519:  gnustep-base-tests.mm added by lcampbel (15kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by lcampbel (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 13 Feb 2014 12:31:54 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 12 Feb 2014 12:01:54 AM UTClcampbelAttached File-=>Added NSCalendarDate.m.patch, #30518
      Attached File-=>Added gnustep-base-tests.mm, #30519

    Back to the top


    Powered by Savane 3.1-cleanup