[mythtv-commits] Ticket #11124: Perl bindings not UTC aware
MythTV
noreply at mythtv.org
Thu Sep 27 17:51:20 UTC 2012
#11124: Perl bindings not UTC aware
--------------------------------------+-------------------------
Reporter: rkulagow | Owner: beirdo
Type: Bug Report - General | Status: new
Priority: minor | Milestone: unknown
Component: Bindings - Perl | Version: Master Head
Severity: medium | Keywords:
Ticket locked: 0 |
--------------------------------------+-------------------------
The perl bindings aren't making the necessary UTC / localtime adjustment.
{{{
diff --git a/mythtv/bindings/perl/MythTV.pm
b/mythtv/bindings/perl/MythTV.pm
index cb0d055..c28f563 100644
--- a/mythtv/bindings/perl/MythTV.pm
+++ b/mythtv/bindings/perl/MythTV.pm
@@ -800,7 +800,7 @@ EOF
}
# Otherwise, format it as necessary. We have to use MySQL here
because
# Date::Manip is not aware of DST differences. Yay. Blech.
- my $sh = $self->{'dbh'}->prepare('SELECT FROM_UNIXTIME(?)');
+ my $sh = $self->{'dbh'}->prepare('SELECT
CONVERT_TZ(FROM_UNIXTIME(?),"SYSTEM","UTC")');
$sh->execute($time); # Assumed to be a correct epoch time (in
GMT)
($time) = $sh->fetchrow_array();
$time =~ s/\s/T/;
}}}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11124>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list