Page 1 of 1

parse-date %Y

Posted: Mon Jun 30, 2008 10:57 pm
by Dmi

Code: Select all

> (date (parse-date "2008" "%Y") 0 )
"Sun Dec 31 08:05:04 8676"
Year is 8676 instead of 2008 expected.

newlisp 9.3.12, Debian Linux

Posted: Mon Jun 30, 2008 11:33 pm
by Lutz
Its works fine on Linux UBUNTU 8.04, Mac OS X 10.5, FreeBSD 6.3 and Solaris SunOS 5.8. So assume this is specific your Linux flavor?

ps: you only should see a few hours (+ 24 for 0 day) time shift between your timezone and UTC. So in Florida I always get 2007, so uou always should specify at least year-month-day. I tested this on 9.4.0 which is identical to 9.3.17, but nothing has changed in this routines since 9.1. See also C-library docs for the strptime() function.

Posted: Tue Jul 01, 2008 7:22 am
by Dmi
Hi, Lutz!
Thanks for reply!

Just checked on Intel Celeron with the same Linux version - all seems to be ok.
Initial test was on Amd64 Thurion with newlisp compiled in 32-bit mode from the same package.

I can't to find any other differences yet... Can I do some system checks to catch?

Thanks for time-shift trik.

Posted: Tue Jul 01, 2008 11:57 am
by Lutz
compile using:

make -f makefile_linux64ILP32

this forces newLISP to be compiled to a 32 application on 64 bit system.



ps: 9.4.0 wilel be up in a few hours