[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: Deprecating Time::Local?



On Sat, 1 Nov 2008, Michael G Schwern wrote:

> Dave Rolsky wrote:
>> On Sat, 1 Nov 2008, Dave Rolsky wrote:
>>
>>> It occurs to me that Time::y2038 provides a drop-in replace for
>>> Time::Local, except for TL's rather insane year-munging behavior.
>>>
>>> I'm going to upload a new Time::Local that uses Time::y2038 under the
>>> hood (and applies insane year-munging on top). I'm seriously tempted
>>> to add a big fat warning telling people to just use Time::y2038
>>> instead, though. Time::Local can stick around for backwards compat.
>>
>> Ok, I take it back. I'm _not_ going to upload a Time::Local that uses
>> Time::y2038. Trying to figure out what kind of insane year munging to do
>> across the vast swath of years Time::y2038 supports is basically
>> impossible, and not worth the effort.
>
> FWIW  It's already done in the y2038 branch of bleadperl.
> http://perl5.git.perl.org/?p=perl.git;a=commitdiff;h=19fe65f9519baaaa799cf67d42551a93b97a556e

Except it's not done, because there aren't any tests. I started working on 
this and I had a lot of test failures. Maybe it was just brain farts on my 
part.

Part of the problem is that you end up with a very confusing API, where 
passing in the year as -1000 turns it into -2900. That's why I decided to 
give up. The API is just too dumb to live.

I really think it's better to deprecate Time::Local entirely.

Maybe Time::y2038 could be tweaked so that if you're using Perl 5.11, it 
just uses the internal functions rather than compiling its own copy of 
them?


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/


Follow-Ups from:
Michael G Schwern <schwern@pobox.com>
References to:
Dave Rolsky <autarch@urth.org>
Dave Rolsky <autarch@urth.org>
Michael G Schwern <schwern@pobox.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]