aboutsummaryrefslogtreecommitdiff
path: root/lib/Object/Groupware.pm
blob: a49b47bd7e585f7e0edbf41261e9ca8063ebe711 (plain)
  1. use v5.36;
  2. use Feature::Compat::Class 0.07;
  3. package Object::Groupware 0.01;
  4. class Object::Groupware;
  5. use utf8;
  6. use Log::Any qw( );
  7. field $log = Log::Any->get_logger;
  8. field $dt_locale : param : reader = undef;
  9. field $dt_time_zone : param : reader = undef;
  10. field $dt_span_time_prefix : param : reader = '';
  11. ADJUST {
  12. if ( defined $self->dt_locale ) {
  13. $dt_locale = DateTime::Locale->load( $self->dt_locale )
  14. unless $self->dt_locale isa DateTime::Locale::FromData;
  15. $log->debugf(
  16. 'Object %s locale: %s (%s)',
  17. __CLASS__, $self->dt_locale->code, $self->dt_locale->name
  18. );
  19. }
  20. if ( defined $self->dt_time_zone ) {
  21. $dt_time_zone = DateTime::TimeZone->new( name => $self->dt_time_zone )
  22. unless $self->dt_time_zone isa DateTime::TimeZone;
  23. $log->debugf(
  24. 'Object %s time zone: %s',
  25. __CLASS__, $self->dt_time_zone->name
  26. );
  27. }
  28. }
  29. 1;