bugGNUstep - Bugs: bug #47661, regression in...

 
 

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

bug #47661: regression in -[NSCalendarDate(OPENSTEP) dateByAddingYears:months:days:hours:minutes:seconds:]

Submitted by:  Tim Ooms <timooms>
Submitted on:  Mon 11 Apr 2016 10:27:54 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon 11 Apr 2016 03:20:27 PM UTC, comment #3:

OK, no problem.

Richard Frith-Macdonald <CaS>
Project Member
Mon 11 Apr 2016 02:11:45 PM UTC, comment #2:

I'm sorry. The cause of this was the software I'm using.
It is using an "unsigned int" for the seconds, to store -3600. Which only causes problems when the seconds in dateByAddingYears is not using int.
Sorry for the fuss, thanks for the quick answer.

Tim Ooms <timooms>
Mon 11 Apr 2016 11:24:40 AM UTC, comment #1:

I can't reproduce this ... I added a regression testcase in svn trunk (the last one in Tests/base/NSCalendarDate/test00.m) for exactly the example date you gave, and tried it out on a 64bit gnu/linux system and a 32bit windows-xp system and it worked on both.

Please can you try that out and confirm whether the testcase passes for you.

If it does, please can you put together another testca§se which demonstrates the problem.

If it doesn't, then I guess we need to look for system-specific issues; so please provide the operating system (including version) you are using and the hardware architecture you are running on (and anything else you can think of that might be relevant ... perhaps a gzipped config.log).

Richard Frith-Macdonald <CaS>
Project Member
Mon 11 Apr 2016 10:27:54 AM UTC, original submission:

Between version 1.24.6 and 1.24.9 (and still in the latest version) there is a regression in the function dateByAddingYears:months:days:hours:minutes:seconds: of NSCalendarDate.

Example input:
2016-01-06 01:00:00 +0100
years, months, days, hours, minutes = 0
seconds = -3600
gives in 1.24.9 as result: 2152-02-12 06:28:16 +0000
in 1.24.6, the result is: 2016-01-06 00:00:00 +0100

Tim Ooms <timooms>

 

No files currently attached

 

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 timooms (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 11 Apr 2016 03:20:27 PM UTCCaSStatusNeed Info=>Invalid
      Open/ClosedOpen=>Closed
    Mon 11 Apr 2016 11:24:40 AM UTCCaSStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1