Skip to content

Commit

Permalink
Seems I borked unix->myth times in my change.
Browse files Browse the repository at this point in the history
The myth->unix needs to convert from localtime -> GMT, but somehow the other
way requires GMT as an input directly.  Still scratching my head on this one.
  • Loading branch information
Beirdo committed Jun 19, 2012
1 parent 9f447f4 commit 121ebdd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mythtv/bindings/perl/MythTV.pm
Expand Up @@ -800,10 +800,8 @@ EOF
}
# Otherwise, format it as necessary. We have to use MySQL here because
# Date::Manip is not aware of DST differences. Yay. Blech.
my @t = localtime(time);
my $offset = timegm(@t) - timelocal(@t);
my $sh = $self->{'dbh'}->prepare('SELECT FROM_UNIXTIME(?)');
$sh->execute($time + $offset);
$sh->execute($time); # Assumed to be a correct epoch time (in GMT)
($time) = $sh->fetchrow_array();
$time =~ s/\s/T/;
return $time;
Expand Down

0 comments on commit 121ebdd

Please sign in to comment.