aboutsummaryrefslogtreecommitdiff
path: root/lib/Object/Groupware.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Object/Groupware.pm')
-rw-r--r--lib/Object/Groupware.pm19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/Object/Groupware.pm b/lib/Object/Groupware.pm
index a49b47b..405ac04 100644
--- a/lib/Object/Groupware.pm
+++ b/lib/Object/Groupware.pm
@@ -16,19 +16,22 @@ field $dt_time_zone : param : reader = undef;
field $dt_span_time_prefix : param : reader = '';
ADJUST {
- if ( defined $self->dt_locale ) {
- $dt_locale = DateTime::Locale->load( $self->dt_locale )
- unless $self->dt_locale isa DateTime::Locale::FromData;
+ if ( defined $self->dt_locale
+ and not $self->dt_locale isa DateTime::Locale::FromData )
+ {
+ $dt_locale = DateTime::Locale->load( $self->dt_locale );
$log->debugf(
- 'Object %s locale: %s (%s)',
+ 'Coerced object %s locale: %s (%s)',
__CLASS__, $self->dt_locale->code, $self->dt_locale->name
);
}
- if ( defined $self->dt_time_zone ) {
- $dt_time_zone = DateTime::TimeZone->new( name => $self->dt_time_zone )
- unless $self->dt_time_zone isa DateTime::TimeZone;
+ if ( defined $self->dt_time_zone
+ and not $self->dt_time_zone isa DateTime::TimeZone )
+ {
+ $dt_time_zone
+ = DateTime::TimeZone->new( name => $self->dt_time_zone );
$log->debugf(
- 'Object %s time zone: %s',
+ 'Coerced object %s time zone: %s',
__CLASS__, $self->dt_time_zone->name
);
}