bugGNU Octave - Bugs: bug #29744, DIR returns datenum with 1 month...

 
 

bug #29744: DIR returns datenum with 1 month offset

Submitted by:  None
Submitted on:  Sun 02 May 2010 11:51:41 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Peter van den BiggelaarOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.3
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 03 May 2010 03:39:01 AM UTC, comment #2:

Thanks for reporting this. The issue was already fixed by changeset 2b05f4aff27c. Please try building from the Mercurial sources in order to have the correct behavior.

Rik <rik5>
Project Administrator
Sun 02 May 2010 12:36:04 PM UTC, comment #1:

You can see how it is done correctly in the function `clock.m`

Anonymous
Sun 02 May 2010 11:51:41 AM UTC, original submission:

the `dir` command returns the date of a file as datenum.
This is determined using the library function `localtime`. This library function returns the month in the range from 0 to 11. Next localtime is translated using the octave `datenum` function that assumes a month is in the range 1 to 12.

Attached dir.m fixes the problem in line 121 by adding 1 to lt.mon

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #20389:  dir.m added by None (4KiB - text/x-objcsrc - fix 1 month datenum offset in dir.m)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (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 project members 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 03 May 2010 03:39:01 AM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 02 May 2010 11:51:41 AM UTCNoneAttached File-=>Added dir.m, #20389

    Back to the top


    Powered by Savane 3.1-cleanup1