From 17451727f5f483394ca894a48e8fa3abe91d5a2b Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 22 Jul 2009 22:05:27 +0000 Subject: [PATCH] fix bombing out on new DateTime --- httemplate/view/cust_main/misc.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index 060da87dd..91b304b5d 100644 --- a/httemplate/view/cust_main/misc.html +++ b/httemplate/view/cust_main/misc.html @@ -85,13 +85,15 @@ % if ( $conf->exists('cust_main-enable_birthdate') ) { -% my $dt = DateTime->from_epoch(epoch => $cust_main->birthdate, -% time_zone=>'floating', -% ); +% my $dt = $cust_main->birthdate ne '' +% ? DateTime->from_epoch( 'epoch' => $cust_main->birthdate, +% 'time_zone' =>'floating', +% ) +% : ''; Date of Birth - <% $cust_main->birthdate ne '' ? $dt->strftime($date_format) : '' %> + <% $dt ? $dt->strftime($date_format) : '' %> % } -- 2.11.0