[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 197
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970 |
Date: |
Fri, 24 Sep 2010 16:39:39 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100622 SeaMonkey/2.0.7 |
Follow-up Comment #6, bug #31079 (project octave):
I "cloned" a fresh copy of the 3.3.52 sources, did ./autogen.sh, ./configure,
make, and then ./run-octave:
octave:1> datestr (datenum (1969, 1, 1), 0)
ans = 01-Jan-1969 00:00:00
octave:2> datestr (datenum (1901, 1, 1), 0)
ans = 01-Jan-1970 00:59:59
octave:3> datestr (datenum (1795, 1, 1), 0)
ans = 01-Jan-1970 00:59:59
So no joy.
I'm wondering a bit what to expect from mktime().
Is the goal really to be able to use datestr() for any date after AD and
-say- some centuries in the future? (as Matlab does?)
I perused through ./gnulib/lib/mktime.c and I'm not very confident as to
whether it will help solve the datestr.m "bug", judging from this stanza
around line 115:
---<snip>
#define EPOCH_YEAR 1970
#define TM_YEAR_BASE 1900
---</snip>
For the record, in config.log & config.status:
address@hidden octave-3.3.52]$ grep -i mktime < config.log
configure:19699: checking for working mktime
| #define GNULIB_TEST_MKTIME 1
<lines 5...72 = same message as above>
| #define GNULIB_TEST_MKTIME 1
configure:50547: defining UGLY_DEFS to be -DPACKAGE_NAME=\\"GNU Octave <long
snip, line contains "-DGNULIB_TEST_MKTIME=1">
ac_cv_func_working_mktime=yes
GNULIB_MKTIME='1'
REPLACE_MKTIME='0'
UGLY_DEFS='-DPACKAGE <long snip, line contains "-DGNULIB_TEST_MKTIME=1">
#define GNULIB_TEST_MKTIME 1
address@hidden octave-3.3.52]$ grep -i mktime < config.status
"CPY=1 -DGNULIB_TEST_MEMPCPY=1 -DHAVE_MEMRCHR=1 -DGNULIB_TEST_MEMRCHR=1
-DGNULIB_TEST_MKFIFO=1 -DGNULIB_TEST_MKTIME=1 -DGNULIB_TEST_NANOSLEEP=1
-DGNU"
S["REPLACE_MKTIME"]="0"
S["GNULIB_MKTIME"]="1"
D["GNULIB_TEST_MKTIME"]=" 1"
address@hidden octave-3.3.52]$
...so perhaps the gnulib version hasn't been included?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31079>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970, J-D Bonjour, 2010/09/19
- [Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970, Philip Nienhuis, 2010/09/20
- [Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970, John W. Eaton, 2010/09/20
- [Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970, Ben Abbott, 2010/09/21
- [Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970, John W. Eaton, 2010/09/22
- [Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970, Ben Abbott, 2010/09/22
- [Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970,
Philip Nienhuis <=
- [Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970, Philip Nienhuis, 2010/09/24
- [Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970, John W. Eaton, 2010/09/24
- [Octave-bug-tracker] [bug #31079] DATESTR function buggy before year 1970, Philip Nienhuis, 2010/09/24