Will be required by rolling loans to get correct times
NB the setting of the TZ in mysql has not been changed as
this appears to rely on $ENV{TZ} being undefined
use C4::Boolean;
use C4::Debug;
use POSIX ();
+use DateTime::TimeZone;
=head1 NAME
$self->{"userenv"} = undef; # User env
$self->{"activeuser"} = undef; # current active user
$self->{"shelves"} = undef;
+ $self->{tz} = undef; # local timezone object
bless $self, $class;
return $self;
}
+=head2 tz
+
+ C4::Context->tz
+
+ Returns a DateTime::TimeZone object for the system timezone
+
+=cut
+
+sub tz {
+ my $self = shift;
+ if (!defined $context->{tz}) {
+ $context->{tz} = DateTime::TimeZone->new(name => 'local');
+ }
+ return $context->{tz};
+}
+
+
+
1;
__END__