Fix multiple Date and DateTime bugs. bug #11079 and bug #11071

This commit is contained in:
Colin Kuskie 2009-09-30 16:50:08 -07:00
parent ddc33b76bb
commit 25b4a0b139
6 changed files with 202 additions and 113 deletions

View file

@ -153,7 +153,7 @@ sub new
{
$self = $class->SUPER::new(@_);
}
elsif ($_[0] =~ /^\d+$/)
elsif ($_[0] =~ /^-?\d+$/)
{
$self = DateTime->from_epoch(epoch=>$_[0], time_zone=>"UTC", locale=>$locale);
}