Steven:

I think these 2 program segments in 'set' method should be in inverted
order:

    $self->{rd_days} = &_to_rd( ...
    $self->{rd_secs} = ...
    $self->{rd_nanosecs} = $self->{nanosecond};

    if($self->{sunset} and $self->{time_zone}) {
        my $DT_Event_Sunrise = $self->{sunset};
        ...
        if($sunset > $DT) {
            $self->{after_sunset} = 1;
            @{$self}{qw/year month day/} = &_from_rd($self->{rd_days} +
1);
        }

Because you will end up with a different day from what was asked.

Instead, you should set the day, and then set RD accordingly.

- Flavio S. Glock

Reply via email to