X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main_Mixin.pm;h=e31a3103148fb32b17479ac3d2a26efda748b51f;hb=221a20d9395b84eeb1f0d384c69c80b5d4e7cdb6;hp=6a2e9058c12913bed5a2235eab0c1c81a4546746;hpb=d800198db4f59bd5369e0d1acbfeb3c7594c32c0;p=freeside.git diff --git a/FS/FS/cust_main_Mixin.pm b/FS/FS/cust_main_Mixin.pm index 6a2e9058c..e31a31031 100644 --- a/FS/FS/cust_main_Mixin.pm +++ b/FS/FS/cust_main_Mixin.pm @@ -372,7 +372,7 @@ Queue job for status updates. Required. =item search -Hashref of params to the L method. Required. +Hashref of params to the L method. Required. =item msgnum @@ -660,13 +660,13 @@ sub time2str_local { $self->{_date_format} ||= {}; if (!exists($self->{_dh})) { - my $cust_main = $self->cust_main; - my $locale = $cust_main->locale if $cust_main; - $locale ||= 'en_US'; + my $locale = $self->cust_main->locale if $self->cust_main; + $locale ||= FS::Conf->new->config('locale') || 'en_US'; + my %info = FS::Locales->locale_info($locale); - my $dh = eval { Date::Language->new($info{'name'}) } || - Date::Language->new(); # fall back to English - $self->{_dh} = $dh; + + $self->{_dh} = eval { Date::Language->new($info{'name'}) } + || Date::Language->new(); # fall back to English } if ($format eq 'short') {