> [Flavio]
> > No, converting from UTC to floating would give the same "unexpected"
> > results.
> >
[Ronald]
> I would set the time zone after I have added/subtractd the duration
> to get the rise/set times.
> As for floating time zones I say leave it at UTC and document
> it.

I agree.

I think that this is a better way to do it, because it keeps DateTime
object inheritance and it takes care of 'locale' and other internals:

    my $tmp_dt1 = $dt->clone->truncate( to => 'day' );

    # $tmp_dt1->set_time_zone( 'UTC' ) 
    #     if $tmp_dt1->time_zone->is_floating;

    my $rise_time = $tmp_dt1 + $rise_dur;
    my $set_time  = $tmp_dt1 + $set_dur;
    return ( $rise_time, $set_time );

How about this:

    This module understands "floating times" as being at time zone
offset 00:00, because there is no such things as floating sunrise or
sunset times.

- Flavio S. Glock

Reply via email to