[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl]: timelocal infinite loops???



At 20:38 96/01/06, Angus McIntyre wrote:

>Try subtracting '1900' from the year before passing it to 'timelocal'; if
>you inspect the output from 'localtime', you'll notice that it gives '96'
>as the year.
>
>Incidentally, I think there *is* something strange with 'timelocal' under
>MacPerl 5. It used to work fine under MacPerl 4, but now something like:
>
>        &timelocal(localtime(time))
>
>simply returns '-1', suggesting that either all is not well or I'm
>overlooking something obvious again.

Been there, done that. Subtracting 1900 makes it return -1 every time. And
I've experienced this under both MacPerl 4 and 5. In fact I upgraded to
Perl 5 largely because I thought this might fix it.

Puzzling, huh? Tim Endres said this stuff worked flawlessly but I'm not so
sure. And I simply *have* to get date conversions working fast!

--
    Brad Cox; bcox@gmu.edu; GMU Pgm on Social and Organizational Learning
Fone (703) 968-8229 Fax (703) 934 1578; Web https://virtualschool.edu/mon
       The Middle of Nowhere Web, a project with paradoxical goals