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

Group
 
 

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

Submitter:  Larry Campbell <lcampbel>
Submitted:  Tue 11 Feb 2014 11:39:35 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-13 CaS StatusNone Fixed
        Open/ClosedOpen Closed
    2014-02-12 lcampbel Attached File- Added NSCalendarDate.m.patch, #30518
        Attached File- Added gnustep-base-tests.mm, #30519

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code