in reply to Converting dates later than 2038 into epochseconds

Normally, with Time::Piece, you would use the strptime() method to parse a date and generate a new Time::Piece object from which you can get the seconds using epoch(). However, it does not appear to handle huge dates.

Here's the Date::Manip way, which handles rarified dates nicely, from the docs:

NOTE: One of the most frequently asked questions that I have gotten is how to parse seconds since the epoch. ParseDateString cannot simply parse a number as the seconds since the epoch (it conflicts with some ISO-8601 date formats). There are two ways to get this information. First, you can do the following:
$secs = ... # seconds since Jan 1, 1970 00:00:00 GMT $date = &DateCalc("Jan 1, 1970 00:00:00 GMT",$secs);
Second, you can call it directly as:
$date = &ParseDateString("epoch $secs");
To go backwards, just use the "%s" format of UnixDate:
$secs = &UnixDate($date,"%s");

Also from the docs, the section pertaining to far-flung dates and the algorithm:

Date::Manip deals with time as it is presented the Gregorian calendar (the one currently in use). The Julian calendar defined leap years as every 4th year. The Gregorian calendar improved this by making every 100th year NOT a leap year, unless it was also the 400th year. The Gregorian calendar has been extrapolated back to the year 0000 AD and forward to the year 9999 AD. Note that in historical context, the Julian calendar was in use until 1582 when the Gregorian calendar was adopted by the Catholic church. Protestant countries did not accept it until later; Germany and Netherlands in 1698, British Empire in 1752, Russia in 1918. Note that the Gregorian calendar is itself imperfect and at some point will need to be corrected. No attempt is made to correct for that, and my great great great grandchildren will be long dead before this even occurs, so it's not an immediate concern. Yes, this is the same type of attitute that caused the great Y2K problem... but I have an excuse: I don't know what the correction will be, so I can't possible implement it. Nobody doubted that the year after 1999 would be known as 2000 :-).

Hope that helps.
Matt