|
From: | anonymous |
Subject: | [Octave-bug-tracker] [bug #29744] DIR returns datenum with 1 month offset |
Date: | Sun, 02 May 2010 11:51:42 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.23 Safari/533.4 |
URL: <http://savannah.gnu.org/bugs/?29744> Summary: DIR returns datenum with 1 month offset Project: GNU Octave Submitted by: None Submitted on: Sun 02 May 2010 11:51:41 AM UTC Category: Interpreter Severity: 3 - Normal Item Group: Incorrect Result Status: None Assigned to: None Originator Name: Peter van den Biggelaar Originator Email: address@hidden Open/Closed: Open Discussion Lock: Any Release: 3.2.3 Operating System: GNU/Linux _______________________________________________________ Details: 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 _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Sun 02 May 2010 11:51:41 AM UTC Name: dir.m Size: 4kB By: None fix 1 month datenum offset in dir.m <http://savannah.gnu.org/bugs/download.php?file_id=20389> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?29744> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |