Fix bugs in how Thingy handles displaying dates to the user in view and search modes.

This commit is contained in:
Colin Kuskie 2009-10-01 13:04:58 -07:00
parent eceeff448a
commit 536ac6cdc7
2 changed files with 48 additions and 25 deletions

View file

@ -892,10 +892,10 @@ sub getFieldValue {
my $processedValue = $value;
my $dbh = $self->session->db->dbh;
if ($field->{fieldType} eq "date"){
if (lc $field->{fieldType} eq "date"){
$processedValue = $self->session->datetime->epochToHuman($value,$dateFormat);
}
elsif ($field->{fieldType} eq "dateTime"){
elsif (lc $field->{fieldType} eq "datetime"){
$processedValue = $self->session->datetime->epochToHuman($value,$dateTimeFormat);
}
# TODO: The otherThing field type is probably also handled by getFormPlugin, so the elsif below can probably be