in reply to timelocal() rejects string-derived input

Hmmm. Cut and paste of your code runs fine here on Linux (ubuntu dapper, x86):
1165881600 54 5 18 12 11 106 1165881600 54 5 18 12 11 106 1165881600 0 0 0 12 11 106 my age in days: 14745.0416666667
I added warnings and strict, the only error was needing 'my $myage'.

I think that Windows uses a different epoch, but I don't see how that might cause the problem.

Hmm...can you try with a date after Jan 1 1970? That's the Unix epoch.

Replies are listed 'Best First'.
Re^2: timelocal() rejects string-derived input
by rwburden (Novice) on Dec 12, 2006 at 18:53 UTC
    You solved it!
      That still feels like a bug to me. On unix, time_t is a signed quantity, to allow times before the epoch to be represented (hence the Unix apocalypse is due sometime in 2038, when the 31-bit overflow happens).

      I wonder if this is a windows bug, perl-on-windows bug or activestate bug?