Front page | perl.datetime |
Postings from January 2003
Re: Picking up the ball
Thread Previous
|
Thread Next
From:
Dave Rolsky
Date:
January 10, 2003 01:02
Subject:
Re: Picking up the ball
Message ID:
Pine.LNX.4.51.0301100255320.25009@urth.org
On Fri, 10 Jan 2003, Matt Sergeant wrote:
> What I want to see is a Time::Piece based on Date::Ical (or if that becomes
> DateTime.pm then fine). I've wanted that since I read the Pod for
> Date::Ical and realised (like David and Dave have) that it's not just for
> the ICal format - it's actually a very nice base class for datetime issues.
>
> Mostly this should be a trivial task. The only hairy issues I can see are
> the fact that some of the stuff is C based using struct tm's. I don't know
> if stuct tm's can go outside of the epoch seconds range. Does anyone else?
> The other thing is that the return from strptime is re-adjusted in C by
> turning it into an epoch time and then back into a proper time. But I'm sure
> that can also be gotten around.
>
> So - any volunteers to take over Time::Piece? (or supply me with a whopping
> great patch?)
My first concern is with API, no implementation. If it's easier to whip
together a quick strptime in Perl, I'd probably prefer to do that. What I
like most about Time::Piece is its API, not the particulars of its
implementation. In fact, it's implementation is obviously problematic
(array-based object, C bits, etc.). Moreover, it looks like the tm struct
it uses does not support non-epoch times, so it's definitely not feasible
to reuse that code.
-dave
/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/
Thread Previous
|
Thread Next