32 |
|
|
33 |
sub epoch_to_iso { |
sub epoch_to_iso { |
34 |
my $t = shift || return; |
my $t = shift || return; |
35 |
|
$t += 60 * 60 * +2; # FIXME add TZ |
36 |
my $dt = DateTime->from_epoch( epoch => $t ) || return; |
my $dt = DateTime->from_epoch( epoch => $t ) || return; |
37 |
print STDERR "BUG: $t != " . $dt->epoch . "\n" unless ($t == $dt->epoch); |
print STDERR "BUG: $t != " . $dt->epoch . "\n" unless ($t == $dt->epoch); |
38 |
return $dt->ymd . ' ' . $dt->hms; |
return $dt->ymd . ' ' . $dt->hms; |
116 |
$sql_where = " WHERE ". $where if ($where); |
$sql_where = " WHERE ". $where if ($where); |
117 |
|
|
118 |
my $sql_order = qq{ |
my $sql_order = qq{ |
119 |
ORDER BY files.id |
ORDER BY files.date |
120 |
LIMIT $on_page |
LIMIT $on_page |
121 |
OFFSET ? |
OFFSET ? |
122 |
}; |
}; |