X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=SMGLog.pm;h=9adf77a75a977d4d7cf01badb9e79aaa29f6fd23;hb=04af13055d99ef1db7da3bd7ae6600b3ca709ea8;hp=e826a5301a964584854e080778ce507db24f4c3f;hpb=97030cb0b3250d71c71d5099429abeae859eac81;p=dweather.git diff --git a/SMGLog.pm b/SMGLog.pm index e826a53..9adf77a 100644 --- a/SMGLog.pm +++ b/SMGLog.pm @@ -53,6 +53,7 @@ sub new my $dir = "$path/$prefix"; $ref->{prefix} = $dir; $ref->{suffix} = $suffix || 'log'; + $ref->{dayno} = int (time / 86400); # make sure the directory exists mkpath($dir, 0, 0777) unless -d $dir;