]> git.mjollnir.org Git - tks.git/commitdiff
Round entry times to 2dp, to prevent stupid entries in WRMS.
authorNigel McNie <nigel@catalyst.net.nz>
Mon, 16 Jun 2008 09:19:21 +0000 (21:19 +1200)
committerNigel McNie <nigel@catalyst.net.nz>
Mon, 16 Jun 2008 09:19:21 +0000 (21:19 +1200)
tks.pl

diff --git a/tks.pl b/tks.pl
index c1a7eb37f7feb2111d842acee092380ec39023e1..bd09bc49ad61dc872667861e8ca610ca837f418b 100755 (executable)
--- a/tks.pl
+++ b/tks.pl
@@ -81,6 +81,8 @@ foreach my $date ( sort keys %{$tkdata} ) {
 
         next unless $args->{'-c'};
 
+        $entry->{time} = int($entry->{time} * 100 + .5) / 100;
+
         # add the time to wrms
         $wrms->add_time(
             $entry->{wr},