format humanly readable dates in url of document
[pxelator] / lib / PXElator / CouchDB.pm
index e897e91..02cfab7 100644 (file)
@@ -13,6 +13,7 @@ use Data::Structure::Util qw(unbless);
 use Scalar::Util qw/blessed/;
 use Storable qw/dclone/;
 use Carp qw/carp/;
+use POSIX;
 
 sub new {
        my ($class, $host, $port, $options) = @_;
@@ -144,7 +145,8 @@ sub audit {
 
 #      carp 'audit ', dump($data);
 
-       $time = int($time); # reduce granularity for url
+#      $time = int($time); # reduce granularity for url
+       $time = strftime("%Y-%m-%d.%H:%M:%S", localtime $time);
        my $package = $caller[0];
        $audit->put( "pxelator/$time.$package.$url", $data );