summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2008-12-27 11:03:18 +0100
committerYorhel <git@yorhel.nl>2008-12-27 11:03:18 +0100
commit6a490c8c2c7c60e5530ace67fb5e526575939849 (patch)
tree757403e602e4f1dfa7b7a020df15b42c5efc5e18
parent6713e044e0b1a0a9dbb61da7a2ce6f252dc95f12 (diff)
Fix for vndb-date-bug-thingy
VNDB::* code uses UTC for everything, while PgSQL uses the server local time zone by default. update_vncache() has this same bug and should actually be fixed as well... but it's not that important. :-)
-rw-r--r--lib/VNDB/DB/Releases.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Releases.pm b/lib/VNDB/DB/Releases.pm
index b2c78d5e..6af2f736 100644
--- a/lib/VNDB/DB/Releases.pm
+++ b/lib/VNDB/DB/Releases.pm
@@ -3,6 +3,7 @@ package VNDB::DB::Releases;
use strict;
use warnings;
+use POSIX 'strftime';
use Exporter 'import';
our @EXPORT = qw|dbReleaseGet dbReleaseAdd dbReleaseEdit|;
@@ -27,7 +28,7 @@ sub dbReleaseGet {
$o{vid} ? (
'rv.vid = ?' => $o{vid} ) : (),
defined $o{unreleased} ? (
- q|rr.released !s TO_CHAR('today'::timestamp, 'YYYYMMDD')::integer| => $o{unreleased} ? '>' : '<=' ) : (),
+ q|rr.released !s ?| => [ $o{unreleased} ? '>' : '<=', strftime('%Y%m%d', gmtime) ] ) : (),
);
my @join = (