* Joshua Hoblitt ([EMAIL PROTECTED]) [26 Mar 2003 19:07]:
> * Iain Truskett wrote:
[...]
> > +    my $rdt = $dt->clone;
> > +    $rdt->set_time_zone( 'UTC' );
> > +    return $self->format_datetime( $rdt );

> I think this is dangerous... asking for -0600 and getting UTC just
> doesn't seem like the right thing to do. Sticking a warn/cluck in
> there would be much better.

A warn/carp perhaps. Even so, though. I don't see why my parser needs to
know anything about the formatter (it was given the input in good faith
and happily parsed it), or why I should wrap my formatter to
make sure things like '-0500' get 'normalized', while letting through
other things. What if '-0500' just happens to be the format I noticed
and there are others that can slip through and cause a warning?

Or should I just wrap the formatter in a 'no warnings;' and have the
code not warn if warnings are off?

Could always have it as an option on new() I suppose, but (Builder
notwithstanding) I've not a fondness for adding lots of options.

Hmm.

I know I'm not going to be happy unless I can have it do it without a
warning and without my code having to do much. I do recognise your
position and can see merit in it, it's just not where I want to go.

Traditionally, this means forking =) I guess I'll be happy if there's
some way to make it do it, even if it's not the default behaviour.


cheers,
-- 
iain.                                          <http://eh.org/~koschei/>

Reply via email to