Skip to content

Commit

Permalink
Make sure that the StockData asset doesn't die when handling various …
Browse files Browse the repository at this point in the history
…date formats. Fixes bug #11986.
  • Loading branch information
perlDreamer committed Jan 4, 2011
1 parent a083737 commit cb7ffb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog/7.x.x.txt
Expand Up @@ -16,6 +16,7 @@
- fixed #12015: Thingy: Custom 'File' form fields get deleted upon save
- fixed #11994: recurring calendar entries
- fixed #11995: recurring calendar entries in trash
- fixed #11986: Finance::Quote can give invalid dates to StockData asset

7.10.6
- fixed #11974: Toolbar icons unclickable in Webkit using HTML5
Expand Down
3 changes: 2 additions & 1 deletion lib/WebGUI/Asset/Wobject/StockData.pm
Expand Up @@ -167,7 +167,8 @@ sub _convertToEpoch {
}
$hour = $self->_appendZero($hour);
$minute = $self->_appendZero($minute);
return $self->session->datetime->humanToEpoch("$year-$month-$day $hour:$minute:00");
my $epoch = eval {$self->session->datetime->humanToEpoch("$year-$month-$day $hour:$minute:00")};
return $epoch;
}

#-------------------------------------------------------------------
Expand Down

0 comments on commit cb7ffb3

Please sign in to comment.