From: ivan Date: Wed, 22 Jul 2009 22:05:27 +0000 (+0000) Subject: fix bombing out on new DateTime X-Git-Tag: root_of_svc_elec_features~990 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=17451727f5f483394ca894a48e8fa3abe91d5a2b fix bombing out on new DateTime --- 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) : '' %> % }