|
Lines 115-120
sub new {
Link Here
|
| 115 |
|
115 |
|
| 116 |
# OAI-PMH handles dates in UTC, so do that on the database level to avoid need for |
116 |
# OAI-PMH handles dates in UTC, so do that on the database level to avoid need for |
| 117 |
# any conversions |
117 |
# any conversions |
|
|
118 |
my $sth = C4::Context->dbh->prepare('SELECT @@session.time_zone'); |
| 119 |
$sth->execute(); |
| 120 |
my ( $orig_tz ) = $sth->fetchrow(); |
| 121 |
$self->{ mysql_orig_tz } = $orig_tz; |
| 118 |
C4::Context->dbh->prepare("SET time_zone='+00:00'")->execute(); |
122 |
C4::Context->dbh->prepare("SET time_zone='+00:00'")->execute(); |
| 119 |
|
123 |
|
| 120 |
# Check for grammatical errors in the request |
124 |
# Check for grammatical errors in the request |
|
Lines 152-157
sub new {
Link Here
|
| 152 |
} |
156 |
} |
| 153 |
|
157 |
|
| 154 |
|
158 |
|
|
|
159 |
sub DESTROY { |
| 160 |
my ( $self ) = @_; |
| 161 |
|
| 162 |
# Reset time zone to the original value |
| 163 |
C4::Context->dbh->prepare("SET time_zone='" . $self->{ mysql_orig_tz } . "'")->execute() |
| 164 |
if $self->{ mysql_orig_tz }; |
| 165 |
} |
| 166 |
|
| 167 |
|
| 155 |
sub get_biblio_marcxml { |
168 |
sub get_biblio_marcxml { |
| 156 |
my ($self, $biblionumber, $format) = @_; |
169 |
my ($self, $biblionumber, $format) = @_; |
| 157 |
my $with_items = 0; |
170 |
my $with_items = 0; |
| 158 |
- |
|
|