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

 
 

bug #29744: DIR returns datenum with 1 month offset

Submitter:  None
Submitted:  Sun 02 May 2010 11:51:41 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Peter van den Biggelaar Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.2.3
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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 Files:
   
   
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
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (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 group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-05-03 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2010-05-02 None Attached File- Added dir.m, #20389

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code