Subject: | Possible bug in Workflow::Persister::DBI |
Date: | Fri, 17 May 2013 16:26:18 +0100 |
To: | bug-Workflow [...] rt.cpan.org |
From: | Sérgio Alves <kaynehril [...] gmail.com> |
Greetings,
I think I might have stumbled on a minor bug inside this module.
When fetching the history, the DateTime created does not take into
consideration the time zone of the defined workflow ( sub fetch_history ):
my @history = ();
while ( my $row = $sth->fetchrow_arrayref ) {
my $hist = Workflow::History->new(
{ id => $row->[0],
workflow_id => $row->[1],
action => $row->[2],
description => $row->[3],
state => $row->[4],
user => $row->[5],
* date => $self->parser->parse_datetime( $row->[6] ),*
}
);
$log->is_debug
&& $log->debug("Fetched history object '$row->[0]'");
$hist->set_saved();
push @history, $hist;
}
The little patch I did to myself was to add the following line at the
beginning of the sub:
$self->parser()->time_zone($wf->time_zone);
Best Regards,
Sérgio Alves